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

Dang, Christophe Christophe.Dang at sidel.com
Fri Jan 25 17:06:20 CET 2013


Hello,

> 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

"t" is not used in your function.

Apart from this, the line is cut by an end of line,
better use a line break after the semi-colon ";"
or use the continuation points "..."

e.g.

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]

same for the definition of Jw

Hope this helps

-- 
Christophe Dang Ngoc Chan
Mechanical calculation engineer

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error), please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.





More information about the users mailing list