freeFall -...

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

View Full Document Right Arrow Icon
function [time_to_impact_with_ground kinetic_energy]=freeFall(mass_in_kg,height_in_ft) %function to compute the time (seconds) to impact with ground and the %kinetic energy (energy) measured in Joules or kg*m^2/s^2 %usage: [time_to_impact_with_ground kinetic_energy]=freeFall(mass_in_kg,height_in_ft) %mass in kg and height in ft gravity=9.81; velocity_initial=0.0; meters=height_in_ft./3.28; %3.28ft = 1 meter
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: time_to_impact_with_ground=sqrt(2.*meters/gravity); %displacement = velocity_initial.*time+0.5.*gravity.*time.^2 %velocity_initial=0.0, so velocity_initial.*time will equal 0 velocity=velocity_initial+gravity.*time_to_impact_with_ground; %velocity=velocity_initial+acceleration.*time, the acceleration is gravity and the time is in seconds kinetic_energy=0.5.*mass_in_kg.*velocity.^2;...
View Full Document

This note was uploaded on 10/21/2010 for the course CS 1371 taught by Professor Stallworth during the Spring '08 term at Georgia Institute of Technology.

Ask a homework question - tutors are online