% example.m % this example is an alternate way to solve the equations on p. 115 function example y0 = 1 % set the initial conditions to 1 tspan = [0 1] %set the integation span from t = 0 to 1 [t y] = ode45(@ode,tspan,y0) % plot the result plot(t,y,'*-') xlabel('time') ylabel('y') %----------------------------------------------------- % ode.m % This function gives the right-hand side for Prob. 8.13 function ydot=ode(t,y) ydot = -10*y;