Question

Using Matlab, Many rides at amusement parks require riders to be a certain minimum height. Assume...

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.

Homework Answers

Answer #1

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****

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT