Jump to content

Using Scilab ODE solver


Runninfarmer

Recommended Posts

This might be a dumb question but when solving ODE's with scilab and you set the independent variable points at which you want to evaluate, what is the middle number used for in t = 0:0.1:5 for the example:

 

function dx = f ( t , x )

dx = sin (2 t ) ;

endfunction

 

t0 = 0

x0= -0.5

t=0:0.1:5;

x = ode(x0, t0, t, f);

plot2d(t, x)

 

Here's the link for the example: http://scilab.in/files/workshops/15-04-2010-mumbai/sengupta-ode.pdf

 

 

Thanks for the help!

Link to comment
Share on other sites

This might be a dumb question but when solving ODE's with scilab and you set the independent variable points at which you want to evaluate, what is the middle number used for in t = 0:0.1:5 for the example:

 

Like in Matlab, that command will create a vector t with values from zero to 5 with stepsize 0.1, i.e.

 

t = [0, 0.1, 0.2, 0.3, .... 4.8, 4.9, 5.0].

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.