Matlab - Exercise 21
The braking distance of a car depends on its speed as the brakes are applied and on the car's braking efficiency. A formula for the braking distance is
bd = s² / (2Rg)
where bd is the braking distance, s is the car's speed, R is the braking efficiency, and g is the acceleration due to gravity (9.81). A script has been written that calls a function to prompt the user for s and R, calls another function to calculate the braking distance, and calls a third function to print the braking distance in a sentence format with one decimal place. You are to write a function stub for the function that prompts for s and R, and the actual function definitions for the other two functions.
[s, R] = promptsandR;
brakDist = calcbd(s, R);
printbd(brakDist)
brakDist = calcbd(s, R);
printbd(brakDist)