% A script to run continuous time systems % % The system is of the form x' = f(x) % % The function "f" is defined in a file called "rhs.m" % global RHSNAME; disp('Continous time system'); setrhs; x0 = input('Please enter the initial vector -> '); [r,c] = size(x0); if (r==1), x0 = x0'; end; t0 = input('Please enter the starting time (default 0) -> '); if (isempty(t0)), t0=0; end; t1 = input('Please enter the ending time (default 1) -> '); if (isempty(t1)), t1=1; end; disp('Working.'); [t,x] = ode45('rhspatch', t0,t1,x0); disp('Done! Plotting graph.'); plot(t,x) disp('To plot phase space type: ') disp('2 dimensions: phase2c'); disp('3 dimensions: phase3c');