The body mass index, or BMI, is a calculation used to determine your level of body...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
The body mass index, or BMI, is a calculation used to determine your level of body fat. BMI is a simple calculation using a person's height and weight. In some cases, it can help a doctor determine your overall fitness and your risk of developing chronic diseases. The formula to calculate BMI is: BMI [weight] [height] = [Kg] [m] 1. Write a function, fn_weight which convert weight unit from pound, lbs to kg 1 [lbs]=0.454[kg] 2. Write a function, fn_height which convers height unit from inch to meter, m 1 [inch] = 0.0254[m] 3. Write a function, fn_BMI which calculates BMI with input values of unit [kg] and [m] 4. Write a script called BMI that shows the table of BMI from height range of 50-80 inch in every 2 inch and weight range of 80 - 220 lbs in every 10 lbs. Make height in a column and weight in a row table, by using either for or while loop. Use 3 functions that are defined in prob.#1-3. Script BMI also prompts the user to input height and weight in inch and pound, respectively and print out its BMI. Generally, if you're at a healthy weight, the BMI should fall between 18.5 and 24.9. Display "Healthy!" message if the calculated BMI is in that healthy range. Output display in table style should be like: Command Window BMI weight [lbs] 80.0 90.0 100.0 110.0 120.0 130.0 140.0 height [inch] 50.0 22.5 25.3 28.1 31.0 33.81 36.6 39.4 52.0 20.8 23.4 26.0 28.6 31.2 33.8 36.4 54.0 19.3 21.7 24.1 26.5 29.0 31.4 33.8 56.0 18.0 28.2 22.4 24.7 26.9 29.2 31.4 58.0 16.7 18.8 20.9 23.0 25.1 27.2 29.3 60.0 15.6 17.6 19.5 21.5 23.5 25.4 27.4 62.0 14.6 16.5 18.3 20.1 22.0 23.8 25.6 64.0 13.7 15.5 17.2 18.9 28.6 22.3 24.1 66.0 12.9 14.5 16.2 17.8 19.4 21.0 22.6 68.0 12.2 13.7 15.2 16.7 18.3 19.8 21.3 70.0 11.5 12.9 14.4 15.8 17.2 18.7 20.1 5. Run BMI.m with the average American man over age 20 of weight = 195.7 lbs and height = 69.2 inch. . *Hint* This is not a good code to display the table as required. Try to modify. %create BMI table %weight range: 80-220 lbs % height range: 50-80 inch W=80; H=50; fprintf("%10s %10s %s ', 'BMI, 'weight', 'height') while W The body mass index, or BMI, is a calculation used to determine your level of body fat. BMI is a simple calculation using a person's height and weight. In some cases, it can help a doctor determine your overall fitness and your risk of developing chronic diseases. The formula to calculate BMI is: BMI [weight] [height] = [Kg] [m] 1. Write a function, fn_weight which convert weight unit from pound, lbs to kg 1 [lbs]=0.454[kg] 2. Write a function, fn_height which convers height unit from inch to meter, m 1 [inch] = 0.0254[m] 3. Write a function, fn_BMI which calculates BMI with input values of unit [kg] and [m] 4. Write a script called BMI that shows the table of BMI from height range of 50-80 inch in every 2 inch and weight range of 80 - 220 lbs in every 10 lbs. Make height in a column and weight in a row table, by using either for or while loop. Use 3 functions that are defined in prob.#1-3. Script BMI also prompts the user to input height and weight in inch and pound, respectively and print out its BMI. Generally, if you're at a healthy weight, the BMI should fall between 18.5 and 24.9. Display "Healthy!" message if the calculated BMI is in that healthy range. Output display in table style should be like: Command Window BMI weight [lbs] 80.0 90.0 100.0 110.0 120.0 130.0 140.0 height [inch] 50.0 22.5 25.3 28.1 31.0 33.81 36.6 39.4 52.0 20.8 23.4 26.0 28.6 31.2 33.8 36.4 54.0 19.3 21.7 24.1 26.5 29.0 31.4 33.8 56.0 18.0 28.2 22.4 24.7 26.9 29.2 31.4 58.0 16.7 18.8 20.9 23.0 25.1 27.2 29.3 60.0 15.6 17.6 19.5 21.5 23.5 25.4 27.4 62.0 14.6 16.5 18.3 20.1 22.0 23.8 25.6 64.0 13.7 15.5 17.2 18.9 28.6 22.3 24.1 66.0 12.9 14.5 16.2 17.8 19.4 21.0 22.6 68.0 12.2 13.7 15.2 16.7 18.3 19.8 21.3 70.0 11.5 12.9 14.4 15.8 17.2 18.7 20.1 5. Run BMI.m with the average American man over age 20 of weight = 195.7 lbs and height = 69.2 inch. . *Hint* This is not a good code to display the table as required. Try to modify. %create BMI table %weight range: 80-220 lbs % height range: 50-80 inch W=80; H=50; fprintf("%10s %10s %s ', 'BMI, 'weight', 'height') while W
Expert Answer:
Related Book For
Calculus And Its Applications
ISBN: 9780134437774
14th Edition
Authors: Larry Goldstein, David Lay, David Schneider, Nakhle Asmar
Posted Date:
Students also viewed these programming questions
-
Write a summary of synthesizing all aspects of the health care issue, through a summary conclusion, concisely of Health Issue Analysis Health Issue Analysis: Part 1 - Obesity and Nutrition Research...
-
The range of healthy weight for adults is usually expressed in terms of the body mass index (BMI), defined, in SI units, as BMI = W (kg)/H2(m2) where W is the weight (actually, the mass) of the...
-
Classify each protein example according to its highest level of protein structure. Primary structure the amino acid sequence of myoglobin Secondary structure a single helical chain of collagen Answer...
-
The state of Georgia recently increased its tax on a pack of cigarettes by $2.00. What type of tax is this? Why might Georgia choose this type of tax?
-
Suppose you fit the model y = 0 + 1x1 + 2x2 + 3x3 + to n = 30 data points and obtain the following result: y = 3.4 - 4.6x1 + 2.7x2 + .93x3 The estimated standard errors of 2 and 3 are 1.86 and...
-
Is it better to use a soft spring in the flexible mounting of a machine? Why?
-
Southwestern University (SWU), a large state college in Stephenville, Texas, enrolls close to 20,000 students. The school is a dominant force in the small city, with more students during fall and...
-
Explain the reasons for issuing long-term financing liabilities, such as bonds and notes payables. and what are the adavantages and disadvantages of long-term financing liabilities. What...
-
One of the food industry companies wants to establish a new production line. The production line consists of 3 parts. The first part has 40 analog sensors and 50 actuators with relay triggered. The...
-
Try to find an individual (e.g., relative, friend, classmate) who now lives, or who in the past lived, in more than one state at the same time (e.g., for business purposes, for school purposes, for...
-
a. Opinion RPC 176 says that extreme care must be used to ensure that the tainted paralegal is totally screened from the family law (domestic) case. Make a list of the steps Attorney B can take to...
-
Ken starts trading on 1 October 2016 and chooses 30 April as his accounting date. He ceases trading on 31 January 2022 and has adjusted trading profits as follows: Compute Ken's trading income for...
-
Does your state have a mini-DOMA? If so, what does it say?
-
Karen belongs to a number of registered pension schemes. Until tax year 2009-10 she had received no benefits from any of these schemes but in October 2009 she took a lump sum of 350,000 from one of...
-
a) It is estimated that 80% of all eighteen-year old women have weights ranging from 103.5 to 144.5 lb. Assuming the weight distribution can be adequately modeled by a normal curve and that 103.5 and...
-
What are the risks and liability factors in an audit? What are the implications to the auditor? What are the implications to the organization? How can the auditor mitigate these risks and liability...
-
Let a, b, c, d be fixed numbers with a 0, and let f(x) = ax 3 + bx 2 + cx + d. Is it possible for the graph of f(x) to have more than one inflection point? Explain your answer.
-
Find the two positive numbers whose product is 25 and whose sum is as small as possible.
-
Is the function, whose graph is drawn in Fig. 7, continuous at the following values of x? x = -3 + -5 -4 -3 -2 -1 Figure 7 y 1 2 3 + 4 5 X
-
_____________ is also used as requirement finding and feasibility testing tool. (a) Prototype (b) Reports (c) System (d) Procedure
-
A prototype can be ___________. (a) Complete system with partial requirements (b) Working model (c) Full-fledged system (d) All of these
-
Which of the following systems development approach is adopted if information requirements are not well defined? (a) SDLC (b) Prototype (c) Structured approach (d) Agile
Study smarter with the SolutionInn App