%%% phase.m: to run this script, at the matlab prompt type %%% phase %%% %%% this script solves the system of ODEs defined in equ.m %%% (a pendulum with friction = eps * velocity) and then makes %%% a Phase Plane Plot of the solution. To vary the friction, change %%% the constant eps in equ.m %%% %%% requires the file equ.m t0 = 0; % Starting time tfinal = 15; % Ending time tol = 1.e-3; % Accuracy trace = 1; % trace y0 = [2 2]'; % Define initial conditions. tspan = [t0 tfinal]; [t, y] = ode23('equ',tspan,y0); % Solve ODE plot(y(:,1),y(:,2),'g'), title('Phase Plane Plot'), % Plot solution xlabel('u-axis'), ylabel('v-axis')