Question: d = ( 1 2 ) g t 2 ( where g = acceleration due to gravity, and t - elapsed time. We want use
where acceleration due to gravity, and 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
Define
Create a vector corresponding to the time values in vector using the formula provided.
Create a table matrix dist time with the first column as values in and second column as
values in d
Provide a title and column headings for the table matrix use disp function
Print the matrix disttime with the fprintf command.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
