% sol solves the currently specified example, with initial conditions 
% t0, x0, and other parameters as specified by the global variables.

if dimension==1
    plot(t0,x0,'o');
	ax=axis;
	if t0<ax(2)
		[s,y]=ode15s(eqn_name,[t0,ax(2)],x0);	% Changed from ode45                 
		plot(s,y,'b')
	end
%
	if ax(1)<t0    
		[s,y]=ode15s(eqn_name,[t0,ax(1)],x0);	% Changed from ode45            
		plot(s,y,'b')
	end 
else
	[s,y]=ode15s(eqn_name,[t0,t0+Tinc],x0);     % Changed from ode45              
	l=length(s);                                          
	t0=s(l);                                               
	x0=y(l,:);                                             
	if dimension==2
        plot(y(1,1),y(1,2),'o');
		plot(y(:,1),y(:,2))                                 
	else            
        plot3(y(1,1),y(1,2),y(1,3),'o');
        plot3(y(:,1),y(:,2),y(:,3))
	end
end
titles
% M. Day, June 4, 2005; May 6, 2012
