Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions