Calculating distance using matlab

  • Thread starter Thread starter Mdhiggenz
  • Start date Start date
  • Tags Tags
    Matlab
AI Thread Summary
The discussion centers on calculating the distance traveled by a race car over the first six seconds using MATLAB. The initial calculation using the trapezoidal rule yielded 395.5, but the expected answer is 776.6. Participants noted a potential error in unit conversion, suggesting that the velocity values should be converted from miles per hour to miles per second. The importance of clear unit specification in problem statements was emphasized, as ambiguity can lead to significant calculation errors. Accurate unit conversion is crucial for obtaining correct distance measurements in physics problems.
Mdhiggenz
Messages
324
Reaction score
1

Homework Statement


The speed of a race car during the first seven seconds of a race is given by:
t(s)=0,1,2,3,4,5,6
v(mi/h)=0,14,39,69,95,114,129

Calculate the distance of the first 6 seconds.

What I did is q=trapz(t,v)=395.5

answer is 776.6.

Where did I go wrong?

Homework Equations





The Attempt at a Solution

 
Physics news on Phys.org
What are the units of distance? Feet, Miles, Furlongs?
 
SteamKing said:
What are the units of distance? Feet, Miles, Furlongs?

Looks like miles from the v.

That may be the source of the error. Shouldn't you convert the v values into mi/sec?
 
the solution does not specify but I would assume miles.
 
Well, if your race car can cover 776.6 miles in 6 seconds, you have quite a machine.

If the solution does not specify units, throw the source material away. It is no good for learning from.
 
Mdhiggenz said:
the solution does not specify but I would assume miles.

If the solution doesn't say then why did you write mi/h in the velocity list?

Did you try converting the v values to miles/second and then use the trap function?
 
Back
Top