Using Matlab,
Many rides at amusement parks require riders to be a certain minimum height. Assume that the minimum height is 120 cm for a certain ride. Write a Matlab function to determine whether the rider is tall enough. When the function is called, it should display one of the following information to the command window.
(i) Sorry, you are not tall enough.
(ii) Height check successful
Please include a copiable Matlab function code and the associated screenshots.
code:
output :
raw_code :
function height_check(h)
if(h<120) %less than 120
disp('sorry, you are not tall enough')
else %greater than 120
disp('Height check successful')
end
end
**do comment for queries and rate me up****
Get Answers For Free
Most questions answered within 1 hours.