Question: d = ( 1 2 ) g t 2 ( where g = acceleration due to gravity, and t - elapsed time. We want use

d=(12)gt2(where g=acceleration due to gravity, and t-elapsed time.
We want use MATLAB to compute the distance travelled as a function of time for a vector of
time values.
Create a variable called start and prompt the user to enter the start time.
Create a variable called finish and prompt the user to enter the end time.
Create a variable called instance and prompt the user to enter the increment between start
and finish time.
Use the user entered values of (start, finish, instance) to create a time vector t.
Define g=9.81ms2
Create a vector d corresponding to the time values in vector t using the formula provided.
Create a table matrix dist time with the first column as values in t and second column as
values in d.
Provide a title and column headings for the table matrix (use disp function)
Print the matrix dist_time with the fprintf command.
d = ( 1 2 ) g t 2 ( where g = acceleration due to

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!