MATLAB homework writing script files??

soccer4ever

New member
Create a script file called car that determines the velocity and distance for
a car with acceleration a = 1.55m/s^2 every second for the first 10 seconds. Output the
results in a file called carOutput.txt in a three-column table in which the first column
is time (s), the second column is distance (m), and the third column in velocity (m/s).
Recall, the formulas for velocity (v) and distance (d) as a function of time of a car that
accelerates from rest at constant acceleration a are
v(t) = a x t and
d(t) = 1/2at^2
 
Back
Top