Runninfarmer Posted August 27, 2011 Posted August 27, 2011 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!
Bignose Posted August 27, 2011 Posted August 27, 2011 looks like a step size to me. That is you step t from 0 to 5 in 0.1 increments: 0.0, 0.1, 0.2, .... 4.8, 4.9. 5.0.
baxtrom Posted August 29, 2011 Posted August 29, 2011 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].
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now