[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Vectorize a function that depends on previous function value
From: |
gergo |
Subject: |
Vectorize a function that depends on previous function value |
Date: |
Mon, 19 May 2014 04:08:35 -0700 (PDT) |
Dear list members!
I have have a discrete time dynamical system:
function [a,b] = dynamicalSystmem(data, params)
a(n) = a(n-1) + data(n) + b(n-1) + someNonLinearFunction(a(n-1))
b(n) = b(n-1) + someOtherNonlinearFctn(a(n-1))
To fit the model to my data, I'm minimizing a simple cost function, which
requires me to iterate the dynamical system function. Currently this is done
by a simple for-loop, which makes the optimization very slow, because this
is done in every optimization step.
However I couldn't find a way to vectorize this for loop. Has anybody of you
an idea how to solve this?
Thank you very much in advance!
Gerald
--
View this message in context:
http://octave.1599824.n4.nabble.com/Vectorize-a-function-that-depends-on-previous-function-value-tp4664169.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Vectorize a function that depends on previous function value,
gergo <=