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...
-
When we calculate average and effective tax rates, do we consider implicit taxes? What effect does this have on taxpayers' perception of equity?
-
A child is to receive a dose of 0.5 teaspoon of cough medicine every 4 hours. If the bottle contains 4 fluid ounces, answer below Exercises. 1. The bottle of medicine contains how many doses for the...
-
10.A company contracted with a marketing firm to construct software and create a business website. A quote was requested and accepted. Sometime later, the business asked for updates and revisions but...
-
Gas absorption or gas scrubbing is a commonly used method for removing environmentally undesirable species from waste gases in chemical manufacturing and combustion processes. The waste gas is...
-
Consider an object falling through air, where po is the density of the object, Pair is the density of the air, m is the mass of the object, A is the effective cross-sectional area of the object, or...
-
Project Description: A company wants to upgrade its existing software systems to improve its operations. The project has a fixed budget, and the company cannot spend more than the allocated amount....
-
Applying what you have learned about future value, write a short essay explaining why the current market value (CMV) of a long-term bond is more volatile than the CMV of a shorter duration bond. To...
-
The U.S. government reported that a total of 38.6 million pounds of toxic chemicals had been released into the air above New Jersey in 1982. A spokesman for the New Jersey Department of Environmental...
-
During the 19221923 German hyperinflation, people reported receiving more money for returning their empty beer bottles than they had originally paid to buy full bottles. Could they have made a living...
-
It has been proposed that real wealth should be calculated by deflating a persons wealth by hourly wages rather than prices. Suppose that wealth is $100,000, the price of a hamburger is $2, and the...
-
Critically evaluate this economic commentary: When it comes to measuring inflation, the average consumer can do a far better job than the economics experts. Over the years I have been using a system...
-
What is the OEE of the operating room? Assume a 12h window in which the OR could be used. The Chiemsee Knee Replacement Clinic (CKRC) is a sports clinic located at the northern edge of the German...
-
Should U.S. antidumping laws be stated in terms of average total costs or average variable costs?
-
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
-
Fiscal policy can make the central banks job impossible because: a. Politicians tend to take a short-term view, encouraging doubt about the commitment to price stability or financial stability. b. In...
-
The best central banks: a. Are independent of political pressure. b. Are accountable to elected representatives and the public. c. Communicate their objectives, actions, and policy deliberations...
-
Assess the effectiveness of the Federal Reserve System.
Study smarter with the SolutionInn App