|
From: | Kai Torben Ohlhus |
Subject: | Re: Vectorize a function that depends on previous function value |
Date: | Mon, 19 May 2014 15:12:28 +0200 |
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.
_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |