Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB ONLY MATLAB ONLY MATLAB ONLY Body mass index (BMI) is a measure of obesity. In standard units, it is calculated by the formula W

MATLAB ONLY MATLAB ONLY MATLAB ONLY

image text in transcribed

Body mass index (BMI) is a measure of obesity. In standard units, it is calculated by the formula W BMI = 703- H2 where W is weight in pounds, and H is height in inches. The obesity classification is: BMI Classification Below ( 29.9) Obese (a) Write an anonymous function to calculate the BMI. (b) Write a user-defined function to convert the weight from kg to pound, and height from cm to inch, where 1kg = 2.20461b, and linch = 2.54cm. (c) You are given a simulated data file named 'bodyinfo.xlsx' that contains weight (in kg) and height (in cm) for 25 people. The first column is the ID number, the second coulumn is the height, and third column is the weight. Write a program in a script file that calculates the BMI of a person. The program reads the weight and height from data file, calculate BMI by calling anonymous function in a) and user-defined function in b) and display the results in a sentense like "ID XXXX, BMI value is YYY, which classifies as ZZZZ, where XXXX is the ID number, YYY is the BMI rounded in 2 decimal places and ZZZZ is the corresponding classification. (d) Write a program in a script file that count the number of people in each class

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

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions