MATLAB: Solving differential equation with ode45 ode45 Best Answer func=@(t,y)(y-1)^2;tspan = [0 10];for x = 0.01:0.05:1 y0 = x; [t,y] = ode45(func,tspan,y0); plot(t, y(:,1)); hold onend Related SolutionsMATLAB: Can you help me with ode45 [t,y] = ode45(@odefun,tspan,y0) MATLAB: Solving a ODE in matlab ode = @(t,y) y.^2-y.*0.1*cos(2.*t)-0.2*cos(2.*t);t=[0 8];y0 = -1;[t,y] = ode45(ode,t,y0);plot(t,y) Related QuestionError using exp Too many input arguments.
Best Answer