ode23('0',[0 10],1) ode23(@(t,y) 0,[0 10],1) ode23(@(t,y) t,[0 10],1) ode23(@(t,y) y,[0 10],1), grid ode23(@(t,y) -y,[0 10],1), grid ode23(@(t,y) 1/(1-3.*t),[0 10],1), grid ode23(@(t,y) [y(2); -y(1)], [0 3*pi], [0;1]), grid [t y] = ode23(@(t,y) [y(2); -y(1)], [0 2*pi], [0;1]); plot(y(:,1), y(:,2), 'o-'), grid, axis equal [t y] = ode23(@(t,y) [y(2); -y(1)], [0 2*pi], [0;1], odeset('Refine', 2)); doc odeset odeset [t y] = ode45(@(t,y) [y(2); -y(1)], [0 2*pi], [0;1]); plot(y(:,1), y(:,2), 'o-'), axis equal, grid [t y] = ode45(@(t,y) [y(2); -y(1)], [0 2*pi], [0;1], odeset('Refine', 1)); syms y(x) dsolve(diff(y(x),x) == y*x) ys = dsolve(diff(y(x),x) == y*x, y(1)==1) fplot(ys) eqn2 = diff(y,x,x) + 8*diff(y,x)+2*y == cos(x) dsolve(eqn2) F = @(t,y) -100*y + 100*t +1 ode45(F, [0 1], 1) ode15s(F, [0 10], 1) expgui ncmgui