glider_no_drag2 - %Set initial conditions v02=.1;...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%RyanCorey %ME 082 %Assignment 7 part II clc clear all %Case I %Set initial conditions v0=1; theta0=pi/2; x0=0; y0=0; w0=[v0 theta0 x0 y0]; %set time span timespan=0:.1:10; %solve the ODE [t,w]=ode45('nodrag1',timespan,w0); %Set values to x and y x=w(:,3); y=w(:,4); %Plot Y vs. X figure(1) hold on plot(x,y) grid on axis([-1 1.5 -1 1]) title('Fig 1: Glider flight path, Y vs. X, D=0(no drag).') xlabel('X, nondimensional x coordinate') ylabel('Y, nondimensional y coordinate') hold off %Case II
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: %Set initial conditions v02=.1; theta02=0; w02=[v02 theta02 x0 y0]; %Set timespan timespan=0:.1:10; %Solve ODE [t,z]=ode45('nodrag1',timespan,w02); %Set values for x and y for case II x2=z(:,3); y2=z(:,4); %Plot Y vs. X for case II figure(2) hold on plot(x2,y2) grid on axis([0 6 -2 .5]) title('Fig 2: Glider flight path, Y vs. X, D=0(no drag).') xlabel('X, nondimensional x coordinate') ylabel('Y, nondimensional y coordinate')...
View Full Document

This note was uploaded on 03/22/2012 for the course ENGINEERIM 1000 taught by Professor Ee during the Spring '12 term at Vermont Tech.

Ask a homework question - tutors are online