[Scilab-users] !--error 2 Invalid factor using ODE solver

torta corrales.lucas at gmail.com
Fri Jan 25 15:40:12 CET 2013


Hi! I´m argentinian, sorry for my english.

I´m having an ´Invaild factor´ error when using the ODE solver.

Here is my code:

-------------------------------------------------------------------------
a1 = 0.5618;
a2 = 1;
a3 = 0;
b1 = 0.00484;
b2 = 0.00264;
b3 = 0.37451;
b4 = 0.1181;
b5 = 0;

function wdot = f(t,w)
    wdot = [a1*w(1) - a2*w(1)*w(2); b1*w(1)*w(2) - b2*w(1)*w(1)*w(2) -
b3*w(2) + b4]
endfunction

function Jw = Jacobianf(t,w)
    Jw = [a1 - a2*w(2), -a2*w(1); b1*w(2) - 2*b2*w(1)*w(2), b1*w(1) -
b2*w(1)*w(1) - b3]
endfunction

t0 = 0;
w0 = [300, 1.5];
h = 0.1;
t  = (0:h:1);

w = ode(w0, t0, t, f);
-------------------------------------------------------------------------

Thanks!

Lucas



--
View this message in context: http://mailinglists.scilab.org/error-2-Invalid-factor-using-ODE-solver-tp4025757.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list