Lab#1 - time(s) Height (m) Height of t Velocity of t 2.11...

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

View Full Document Right Arrow Icon
LAB #1 Garrett Lucas CVEN489 2.10 M-FILE (lab1.m) % lab1.m % % This program solves problem 2.10 in Chapman (2008). % Garrett Lucas % Spring 2010 % Height = input('Enter the Initial Height above Earth Surface:'); Velocity = input('Enter the Initial Velocity of Ball:'); t=(0:.01:20); g=-9.81 h=(1/2).*(g).*(t.^2)+Velocity.*t+Height; v=g*t+Velocity; plot(t,h,t,v) title ( 'Plot of Height as a function of Time'); xlabel('time(s)'); ylabel('Height (m)'); legend('Height of t','Velocity of t') grid on; Command Window Enter the Initial Height above Earth Surface:1000 Enter the Initial Velocity of Ball:100 0 5 10 15 20 25 30 -500 0 500 1000 1500 2000 Plot of Height and Velocity as a function of Time
Background image of page 1

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

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: time(s) Height (m) Height of t Velocity of t 2.11 M-FILE (lab12.m) % lab12.m % % This program solves problem 2.11 in Chapman (2008). % % Garrett Lucas % Spring 2010 % x1 = input('Enter x1:'); y1 = input('Enter y1:'); x2 = input('Enter x2:'); y2 = input('Enter y2:'); Distance=sqrt((x1-x2)^2+(y1-y2)^2) Command Window Enter x1: 2 Enter y1: 3 Enter x2: 8 Enter y2: -5 Distance = 10 2.13 M-File (lab13.m) % lab13.m % % This program solves problem 2.13 in Chapman (2008). % % Garrett Lucas % Spring 2010 % x= input('x:'); mycosh = (exp(x) + exp(-x))/2 Command Window x:3.0 mycosh = 10.0677 >> cosh(3.0) ans = 10.0677...
View Full Document

This note was uploaded on 11/09/2011 for the course CVEN 489 taught by Professor Staff during the Spring '08 term at Texas A&M.

Page1 / 2

Lab#1 - time(s) Height (m) Height of t Velocity of t 2.11...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online