Please help me. I am trying to use Euler integration to integrate for 10 seconds with a step size of .01 seconds. Plot x versus time.
x(0) = 1
t=0:.01:10;x0=1;xdot=-2*(x^3)+sin(0.5*t)*x;for t=0:0.01:10 x=integrate(xdot,t,x0);endplot(t,x)
Best Answer