CFU 11 Conditionals.docx - CFU 11 Conditionals branching and fprintf Individual Submission 20 minutes Submit your MATLAB m file entitled f by the end of

CFU 11 Conditionals.docx - CFU 11 Conditionals branching...

This preview shows page 1 out of 1 page.

CFU 11 Conditionals, branching, and fprintf. Individual Submission, 20 minutes. Submit your MATLAB m file entitled f by the end of class through the submission box. TASK: Prepare a MATLAB program called Body_Mass_Index that inputs the weight in pounds and height in inches of an individual, and then calculates the BMI in kg/m 2 according to BMI ( kg m 2 )= weight lb height ¿ 2 703. Use a series of conditional arguments and statements to do the following: If the BMI is less than 18.5 kg/m 2 , your program should output a message using the fprintf function, on a new line, “A BMI of XX.X suggests that the individual may be underweight” where the value of the BMI is displayed to 1 decimal place. If the BMI is between 18.5 and 25 kg/m 2 , the output should be on a new line “ A BMI of XX.X kg/m
Image of page 1

You've reached the end of your free preview.

Want to read the whole page?

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes