% % Written by: % -- % John L. Weatherwax 2006-07-31 % % email: wax@alum.mit.edu % % Please send comments and especially bug reports to the % above email address. % %----- close all; addpath('../../Code'); [tout,yout]=ode23tx( @prob_7_6_fn, [0, 1], [ 1 ] ); figure; h1=plot( tout, yout, '.' ); hold on; grid on; fprintf('%s required %d steps\n','ode23tx',length(tout)-1); %opts = odeset('reltol',10^(-6),'refine',1); [tout,yout]=ode23s( @prob_7_6_fn, [0, 1], [ 1 ] ); h2=plot( tout, yout, 'or' ); fprintf('%s required %d steps\n','ode23',length(tout)-1); legend([h1,h2],{'ode23tx','ode23s'}); return;