MATLAB: Time in seconds ode45

ode45timetime series

Hi,
How can I create an array of 10 seconds start from 0 second increment by 0.1 seconds to 10 seconds?
Thank you
I tried to use seconds function but it didn't work I need this time for ode45 tspan

Best Answer

Create the ‘tspan’ argument as a vector of more than two elements:
tspan = 0 : 0.1 : 10;
.
Related Question