Using MATLAB: The velocity, v, and the distance, d, as a function of time, of a car...

Free

50.1K

Verified Solution

Question

Mechanical Engineering

Using MATLAB:

The velocity, v, and the distance, d, as a function of time, ofa car that accelerates from rest at constant acceleration, a, aregiven by

= a n d = 12

Determine v and d at every second for the first 10 seconds for acar with acceleration of = 15 ft/s2. Your output must have exactlythe same format as the template table below. Note that dots havebeen added to the table below; you can count the dots to determinethe exact spacings. Also note the units.

··········Time (s) ······· ···Distance (ft) ·········Velocity(mph)··········x.x·················x.xxe+yy···············x.xxx

Answer & Explanation Solved by verified expert
3.7 Ratings (299 Votes)

MATLAB CODE

clear
clc;
a = 15; %ft/s2 (acceleration)
for i = 1:10
    t(i) = i; %time span
    d(i) = 12 + (1/2)*a*t(i)^2; % initial distane is 12 ft.
    v(i) = a*t(i)*(3600/5280); % 1 mile = 5280 ft and 1h =3600 sec
end
table = [t' d' v']

Ans

Time(s) Distance(ft) velocity (mph)
1.0000      19.5000 10.2273
2.0000    42.0000 20.4545
3.0000      79.5000 30.6818
4.0000     132.0000 40.9091
5.0000    199.5000 51.1364
6.0000    282.0000 61.3636
7.0000     379.5000 71.5909
8.0000     492.0000 81.8182
9.0000     619.5000 92.0455
10.0000    762.0000 102.2727

Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students