clear all close all clc tspan=[0 1 2 3]; y0=5; [T,Y]=ode45('odefun1',tspan,y0); tspan2=[0 10]; y02=[1 0]; [T2,Y2]=ode45('odefun2',tspan2,y02); figure(4) plot(Y2(:,1),Y2(:,2)) figure(5) plot(T2,Y2(:,1),'b',T2,Y2(:,2),'r') tspan3=[0 10]; y03=[1 4]; [T3,Y3]=ode23('odefun3',tspan3,y03); figure(4) plot(Y3(:,1),Y3(:,2)) figure(5) plot(T3,Y3(:,1),'b',T3,Y3(:,2),'r')