Question: hi, can you write the following code in Matlab or use its language please, thank you! 1. In one of your previous in-class assignments you
1. In one of your previous in-class assignments you calculated BMI from mass and height, then displayed a message according to the table below. Now, write a function which receives mass and height and does the above tasks (calculates BMI, and displays a message according to BMI range). Your function must not return BMI value. It only needs to display an appropriate message. No flowchart is needed. Calculate BMI according to this formulla: BMI=height2mass where height is in meters and mass is in kilograms. Then, display a text message based on the computed BMI, as indicated in the table below. - Save your function as "BMIFirstnameLastname.m". Do not forget to add a few lines of comments for its usage (check or slides for more examples). - Write a script that receives mass and height from user and passes them to your function. Save your script as "InClassAssignment7ExiFirstnameLastname.m". - Copy the contents of your function and paste them here. - Copy the code you used to call your function and the result you got and paste them here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
