% initsys.m % Used to enter necessary information for 1st order ODE systems. Needed by % PPLANE2D.M, SYS3PLOT.M. global A B g eqn_name tvec x0vec s y N=20; %%%%% % User entered info/choices t0=0; tf=2; % Initlal and final t-values x0vec=[3,2]; % Initial x(t)-values (one for each system equation). initax=[-2.5,2.5,-2.5,2.5]; % Plot window axis ranges A=[1,1; 4,1]; % RHS matrix for x' = Ax system. Contains coeff. for linear terms B=[]; % Matrix of coeff. for nonlinear terms x1symb='2*exp(3*t)+exp(-t)'; % if 2nd order ODE, this is symbolic solution x2symb='4*exp(3*t)-2*exp(-t)'; % if 2nd order ODE, this is symbolic derivative eqn_name='cclin'; % MATLAB function name to be used by ODE45 symbolicplot='solutions'; % symbolicplot='phase'; % symbolicplot='eigenvals'; % symbolicplot=''; %%%%% tvec=[t0, tf]; eigvals=eig(A); [s,y]=ode45(eqn_name,tvec,x0vec);