A person can run at a speed of 7.5 ft/s and can swim at a speed of 4.1 ft/s.
By the way, this needs to be written in MATLAB. Thanks!
4_15. A person can run at a speed of 7.5 ft/s and can swim at a speed of 4.1 ft/s. In order to reach the child in the shortest time the person runs a certain distance X, and then swims along the dotted line to reach the child. Write a MATLAB program that determines the total time required to reach the child as a function of distance X to run (X ranging from 0 to 5000 ft at 1 ft increment In the program define a vector X with values ranging from 0 to 5,000 with increments of 1. Use this vector to calculate the corresponding values of distance to swim (D). Then calculate the total time to reach the child (t) which is made of time taken for running and that taken for swimming (a) Use MATLAB's built-in function min ) to find the "minum time" to reach the child, and the corresponding "run distance". Program will display the minimum time and the required run distance X to achieve this. (b) Plot time vs X; Label Y-axis as Time, s', and X-axis as Distance to run, ft. Plot will not show the symbols but it will have black lines drawn through the data points. 10,000 ft Person 3,000 ft Child
Solved
Programming in Assembly Language
1 Answer
HENRY KURIA
Login to view answer.