help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

passing sigmoid_train function to xdot equation


From: shm
Subject: passing sigmoid_train function to xdot equation
Date: Thu, 3 Apr 2014 03:19:57 -0700 (PDT)

Hi,

I am trying to pass sigmoid_train function in to differential equation which
is then evaluated by lsode. Here is the example code:

t = linspace (0,30,100);
range = [0 0.0625;7 7.0625;14.0 14.0625;21.0 21.0625];
rc = [0 57.947;0 57.947;0 57.947;0 57.947];
tt= sigmoid_train (t, range, rc);
x0=0;
y = lsode (@ (x,t) ex (x,t,tt), x0, t);
plot(t,y)

Function file:

function xdot = f (x,t,tt)
xdot= -0.4077*(x)+tt;
endfunction

But when i try to run this code following error appears:
warning: function name `f' does not agree with function file name `
sts\ex.m'
warning: implicit conversion from matrix to real vector
error: lsode: inconsistent sizes for state and derivative vectors
error: called from:
error:   D:\Octaves\tests\sigmoid.m at line 17, column 3

Please help me that how can i pass the sigmoid function values to my xdot
equation.
Thanks!




--
View this message in context: 
http://octave.1599824.n4.nabble.com/passing-sigmoid-train-function-to-xdot-equation-tp4663479.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]