Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The distance from my house to my office is 1.5 miles. Every % morning, I have to

ID: 642582 • Letter: T

Question

The distance from my house to my office is 1.5 miles. Every

% morning, I have to decide whether to take the bus that

% (once it arrives) 25 mph, or to walk. I can walk at 4 mph.

% Write a script to determine how frequently the buses should

% run to give them a 50% chance of getting me to the office

% faster than walking.

%

% analysis:

% 1. compute the time it takes to walk to work

% 2. compute the time it takes on the bus

% 3. difference is the tolerable wait time (twt)

% 4. frequency is 1 / 2*twt

% Use Matlab to write the script

Explanation / Answer

i followed your steps and done hope it helps
-----------------------------------------------------
distance=1.5
%computing time taken to walk 4m/s converted to miles 0.00248548
walkTime = distance/0.00248548
%computing time taken by bus
busTime = distance/0.0155343
tolerateTime = walkTime-busTime
frequency = 1/(2*tolerateTime)
fprintf('chance of getting reaching faster %f ', frequency);

-------------------------------------------------------
output
-------------------------------------------------------
distance = 1.5000   
walkTime = 603.51   
busTime = 96.561
tolerateTime = 506.94   
frequency = 9.8630e-04
chance of getting reaching faster 0.000986

-------------------------------------------------------

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote