# Prob_1 - %Song, Hwan %AAE 340 %Problem Set 6 %Problem 1...

This preview shows pages 1–2. Sign up to view the full content.

%Song, Hwan %AAE 340 %Problem Set 6 %Problem 1 % %Given clear all close all clc c to = 0.; tf = 10; tspan = [to,tf]; tt = [to:0.001:tf]; t r0 = 3; %m rdot0 = 0; %m/s B0 = 0; %rad Bdot0 = 0.7; %rad/s B k = 8; %N/m m = 1; %kg r_o = 1.5;%m r %ODE's u0 = [ r0 rdot0 B0 Bdot0 ]; dt = [to,tf]; options = odeset('RelTol',1e-10,'AbsTol',[1e-12 1e-12 1e-12 1e-12]); [t,u] = ode45('fpen3d',tspan,u0,options); [ %Conversion r = u(:,1); Beta = u(:,3)*180/pi(); B %Constants E = 0.5*m.*(u(:,2).^2+u(:,1).^2.*u(:,4).^2)+0.5*k.*(u(:,1)-r_o).^2; H = m.*u(:,1).^2.*u(:,4); H %Plots subplot(221); plot(t,r,'k'); grid on; axis([0 4.5 1 3.2]); title({'RADIUS HISTORY by Song, Hwan'}); xlabel('Time in sec'); ylabel('Radius in meter'); subplot(222); plot(t,Beta,'k'); axis([0 4.5 0 500]); title({'BETA HISTORY by Song, Hwan'}); xlabel('Time in sec'); ylabel('Beta in degree'); grid on; subplot(223); plot(r.*cos(u(:,3)),-1.*r.*sin(u(:,3)),'k'); axis([-3 3 -3 3]); title({'Position on Horizontal Plane';'tf = 10secs by Song, Hwan'}); xlabel('X in meter'); ylabel('Y in meter');

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

## This document was uploaded on 10/24/2010.

### Page1 / 2

Prob_1 - %Song, Hwan %AAE 340 %Problem Set 6 %Problem 1...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online