Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Numerical Methods using MATLAB Write a program that calculates and displays a persons body mass index (BMI). The BMI is often used to determine whether

Numerical Methods using MATLAB

Write a program that calculates and displays a persons body mass index (BMI). The BMI is often used to determine whether a person with a sedentary lifestyle is overweight or underweight for his or her height.

A persons BMI is calculated with the following formula: BMI = weight (703 height^2)

where weight(W) is measured in pounds and height(H) is measured in inches. The program should display a message whether the person has optimal weight, is underweight, or is overweight. A sedentary persons weight is considered to be optimal if his or her BMI is between 18.5 and 25. If the BMI is less than 18.5, the person is considered to be underweight. If the BMI value is greater than 25, the person is considered to be overweight. Make following dat files and submit them.

- calculate BMI with W = 195 lb and H = 69 inches and save the BMI on HW2_6.dat file

- calculate BMI with W = 145 lb and H = 70 inches and save the BMI on HW2_7.dat file

You just calculate BMI with given conditions. Now, make a function m-file named BMI which accept two parameters, i.e., weight and height and calculate the BMI and return ?1(underweight case), 0(optimal case), or 1(overweight case). With your own function mfile, make the following dat files and submit them.

- calculate BMI with weight range 80 lb ? W ? 250 lb, ? W = 0.5 lb and height H = 62 inches and save the BMI on HW2_8.dat file

- calculate BMI with weight W =180 lb and height range 50 inches ? H ? 80 inches, ? H = 0.5 inch and save the BMI on HW2_9.dat file

- calculate BMI with weight W =200 lb and height range 60 inches ? H ? 84 inches, ? H = 0.5 inch and save the BMI on HW2_10.dat file

THANKS FOR HELPING ME ( MUST BE USED MATLAB)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 10g SQL

Authors: Joan Casteel, Lannes Morris Murphy

1st Edition

141883629X, 9781418836290

More Books

Students also viewed these Databases questions

Question

Describe some common hazards in the contemporary workplace

Answered: 1 week ago

Question

What is conservative approach ?

Answered: 1 week ago

Question

What are the basic financial decisions ?

Answered: 1 week ago