clear all % set up global variables for use in the DE routine. global s V K p t V = 2; K = 1; t = 0:0.1:10; s0 = 8; %substate initial value p0 = 0; %product initial value % initial state for use in DE solver. DE0 = [s0;p0]; [t,St] = ode45('LuciaIRamirezDE',t,DE0); figure sp = plotyy(t,St(:,1),t,St(:,2)); title('s and p vs time') xlabel('time') ylabel(sp(1), 's function') ylabel(sp(2),'p function')