Question

In: Computer Science

USING MATLAB: Create a BMI calculator application that reads the user’s weight in pounds and height...

USING MATLAB: Create a BMI calculator application that reads the user’s weight in pounds and height in inches (or, if you prefer, the user’s weight in kilograms and height in meters), then calculates and displays the user’s body mass index. Also, the application should display the following information from the Department of Health and Human Services/National Institutes of Health so the user can evaluate his/her BMI:

BMI VALUES
("Underweight : Less than 18.5
Normal : between 18.5 and 24.9
Overweight : between 25 and 29.9
Obese : 30 or greater
  

Solutions

Expert Solution

weight = input('Enter weight in pounds: ');
height = input('Enter height in inches: ');
BMI = weight*703/height^2;
fprintf('Calculated BMI: %g\n',BMI)
fprintf('Evaluation: ');
if BMI<18.5
fprintf('Underweight\n')
elseif BMI <=24.9
fprintf('Normal\n')
elseif BMI<=29.9
fprintf('Overweight\n')
else
fprintf('Obese\n')
end


Related Solutions

What is the BMI for a person his weight is 173 pounds and his height is...
What is the BMI for a person his weight is 173 pounds and his height is 5 feet and 7 inches. Make sure to write all the mathematics steps
Java - Write a program to calculate a user’s BMI and display his/her weight status. The...
Java - Write a program to calculate a user’s BMI and display his/her weight status. The status is defined as Underweight, Normal, Overweight and obese if BMI is less than 18.5, 25, 30 or otherwise respectively. You need to read weight (in kilogram) and height (in metre) from the user as inputs. The BMI is defined as the ratio of the weight and the square of the height. [10 marks]
calculate the BMi. weight 138lb, height 5ft and 5 inches
calculate the BMi. weight 138lb, height 5ft and 5 inches
The Body Mass Index (BMI) is a value calculated based on the weight and the height...
The Body Mass Index (BMI) is a value calculated based on the weight and the height of an individual. In a small European city, a survey was conducted one year ago to review the BMI of the citizens. In the sample 22 with 200 citizens, the mean BMI was 23.3 kg/m and standard deviation was 1.5 kg/m . It is reasonable to assume the BMI distribution is a normal distribution. (a) Find the point estimate of the population mean BMI...
The Body Mass Index (BMI) is a value calculated based on the weight and the height...
The Body Mass Index (BMI) is a value calculated based on the weight and the height of an individual. In a small European city, a survey was conducted one year ago to review the BMI of the citizens. In the sample with 200 citizens, the mean BMI was 23.3 kg/m2 and standard deviation was 1.5 kg/m2 . It is reasonable to assume the BMI distribution is a normal distribution. (a) Find the point estimate of the population mean BMI one...
The following data was collected on the height (inches) and weight (pounds) of women swimmers. Height...
The following data was collected on the height (inches) and weight (pounds) of women swimmers. Height Weight 68 132 64 108 62 102 65 115 66 128 Provide a regression analysis from the height and weight data. SUMMARY OUTPUT Regression Statistics Multiple R 0.9603 R Square 0.9223 Adjusted R Square 0.8963 Standard Error 4.1231 Observations 5 ANOVA df SS MS F Significance F Regression 1 605 605 35.5882 0.0094 Residual 3 51 17 Total 4 656 Coefficients Standard Error t...
a C++ program that reads in weight in pounds and outputs the equivalent length in Kilograms...
a C++ program that reads in weight in pounds and outputs the equivalent length in Kilograms and grams. Use at least three functions: one for input, one or more for calculating, and one for output. Include a loop that lets the user repeat this computation for new input values until the user says he or she wants to end the program. 1 pound (lb) is equal to 0.45359237 kilograms (kg). There are 1000 grams in a kilogram and 16 ounces...
a C++ program that reads in weight in pounds and outputs the equivalent length in Kilograms...
a C++ program that reads in weight in pounds and outputs the equivalent length in Kilograms and grams. Use at least three functions: one for input, one or more for calculating, and one for output. Include a loop that lets the user repeat this computation for new input values until the user says he or she wants to end the program. 1 pound (lb) is equal to 0.45359237 kilograms (kg). There are 1000 grams in a kilogram, and 16 ounces...
Write an application, CylinderStats, that reads the radius and height of a cylinder and prints its...
Write an application, CylinderStats, that reads the radius and height of a cylinder and prints its surface area and volume. Use the following formulas. Print the output to five decimal places. In the formulas, represents the radius and the height.Surface are 2πr(r+ h) Volume:πr2h Design and implement a class Cylinder that contains instance data that represents the cylinder’s radius and height. Define a Cylinder constructor to accept and initialize the radius and height.Include getter and setter methods for all instance...
The data set is height in inches and weight in pounds of random patients at the...
The data set is height in inches and weight in pounds of random patients at the Dr's office. Predict the weight of a patient that is 67 inches tall. Is it possible to predict using linear regression? Support your answer Linear regression was completed with the following results: Equation: Weight = -281.847 + 6.335*Height p-value = 0.00161 Height Weight 68 148 69 126 66 145 70 158 66 140 68 126 64 120 66 119 70 182 62 127 68...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT