MATLAB Answers

Write this code in MATLAB.

265 views (last 30 days)
vmnf kfnk
vmnf kfnk on 10 Apr 2020
Commented: Haya Aldawsari on 29 May 2021
Write this code in MATLAB.
1. As of early 2018, Usain Bolt holds the world record in the men's 100-meter dash. It is 9.58 seconds. What was his average speed in km/h? Assign the result to a variable called hundred.
2. Kenyan Eliud Kipchoge set a new world record for men of 2:01:39 on September 16, 2018. Assign his average speed in km/h to the variable marathon. The marathon distance is 42.195 kilometers.
Expert Answer
  13 Comments
Ashish Kumar
Ashish Kumar on 15 Jan 2021
%Converting distance in kilometers
distance1 = 100/1000;
%Converting time in hours
time1 = 9.58/3600;
%Calculating speed
hundred = distance1 / time1
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
distance2 = 42.195;
%Calculating and Converting time in hours
time2 = (121*60+39)/3600;
%Calculating speed
marathon = distance2 / time2

Sign in to comment.

Accepted Answer

vmnf kfnk
vmnf kfnk on 27 Apr 2020
y=0.1/9.58;
hundred=y*3600
x=42.195/((121*60)+39);
marathon=x*3600
  3 Comments
Walter Roberson
Walter Roberson on 11 May 2020
The link to learningtool does not go anywhere useful. I am not sure that we as outside people would be able to see a student solution anyhow.

Sign in to comment.

More Answers (4)

Md. Shahidul Islam Shabuz
Md. Shahidul Islam Shabuz on 11 Aug 2020
y=0.1/9.58;
  1 Comment
Rik
Rik on 11 Aug 2020
You are aware this is not a complete solution? Also, this is a homework question. You're doing everybody a disservice by posting complete solutions.

Sign in to comment.


Gokul Krishnan
Gokul Krishnan on 8 Sep 2020
Edited: Walter Roberson on 8 Sep 2020
y=0.1/9.58;
hundred=y*3600
x=42.195/((121*60)+39);
marathon=x*3600

Abhiram K Narayanan
Abhiram K Narayanan on 20 Nov 2020
us_dist = 0.1
us_time = (9.58/3600)
hundred = us_dist/us_time
ken_dis = 42.195
ken_time = 2.0275
marathon = ken_dis/ken_time

Haya Aldawsari
Haya Aldawsari on 23 May 2021
%Usain
time1 = (9.58/60)/60
distance1 = 100/1000
hundred = distance1/time1
%Kenyan
time2 = 2 + (1/60) + (39/3600)
distance2 = 42.195
marathon = distance2 / time2
  6 Comments
Haya Aldawsari
Haya Aldawsari on 29 May 2021
Thank you so much for your advice
Now I understand your point and you are right
I will definitely try my best to answer non-homework questions and learn from others' answers.

Sign in to comment.

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by