Free_fall_d

Free_fall_d - t = input('Time is in Sec. Please enter t for...

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

View Full Document Right Arrow Icon
% Jeremy Debruce % 11/10/2008 % Free Falling Object % This program will calculate the Distance of a falling object. % Defined Variables clear,clc g = 9.81; t = (0:10:100); % Prompt the user to enter the value for g. g = input('Enter the Acceleration due to gravity. ') % Prompt the user to enter the value for Time.
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t = input('Time is in Sec. Please enter t for time. '); % Find the distance. d = (1/2)*g*t.^2; % Table of results [Time,distance]. fprintf('%8.0f\n', '%10.2f'); Table = [t.',d.'] plot(t,d) Title('The Distance Travelled in a Free Fall') xlabel('Time(Sec)'), ylabel('Distance')...
View Full Document

Ask a homework question - tutors are online