Question: ### 4 . Function for Body Mass Index In previous problem, you just calculate BMI with given conditions. Now, make a function m - file

### 4. Function for Body Mass Index
In previous problem, 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 m-file, make the following dat files and submit them.
- calculate BMI with weight range $80lbW250lb$,$W=0.5lb$ and height $H=62inches$ and save the return values (series of -1,0, or 1) on ***HW2_8.dat*** file (1 by some matrix)
- calculate BMI with weight $W =180 lb$ and height range $50 inches H 80 inches$, $ H =0.5 inch$ and save the return values (series of -1,0, or 1) on ***HW2_9.dat*** file(1 by some matrix)
- calculate BMI with weight $W =200 lb$ and height range $60 inches H 84 inches$, $ H =0.5 inch$ and save the return values (series of -1,0, or 1) on ***HW2_10.dat*** file (1 by some matrix)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!