Question

in activity 1.11 you wrote matlab code to compute a patient's body mass index (BMI),according to...

in activity 1.11 you wrote matlab code to compute a patient's body mass index (BMI),according to the formula BMI=mass/height^2 based on a height (in meters) and weight(in kilograms) entered using the keyboard.Modify this code (or write a new version) to subsequently display a text message based on the computed BMI as indicated in the table below.

0 0
Add a comment Improve this question Transcribed image text
Answer #1
height = input("Enter patient's height(in meters): ");
weight = input("Enter patient's weight(in kilograms): ");
bmi = weight/height^2; % Calculate BMI
fprintf("Patient's BMI is %f\n", bmi);
if bmi >= 30 % BMI of 30 or more
    fprintf("Patient has obesity\n");
elseif bmi >= 25 % BMI 25 to 29.9
    fprintf("Patient is overweight\n");
elseif bmi >= 18.5 % BMI 18.5 to 24.9
    fprintf("Patient has normal weight\n");
else % BMI below 18.5
    fprintf("Patient is underweight\n");
end

OUTPUT:

AS THERE WAS NO TABLE PROVIDED, I HAVE DONE THE QUESTION BY ASSUMING TABLE CONTENT.

PROVIDE TABLE CONTENT FOR BETTER HELP

Add a comment
Know the answer?
Add Answer to:
in activity 1.11 you wrote matlab code to compute a patient's body mass index (BMI),according to...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The body mass index (BMI estimates the amount of fat in a person's body. It is defined as the person's mass m in kilograms divided by the square of the person's height h in meters. Write...

    The body mass index (BMI estimates the amount of fat in a person's body. It is defined as the person's mass m in kilograms divided by the square of the person's height h in meters. Write the formula for BMI in terms of m and h. 0 BMI In the United States, most people measure weight in pounds and height in feet and inches. When weight W is measured in pounds and height h is measured in inches, the BMI...

  • The following are body mass index (BMI) scores measured in 9 patients who are free of...

    The following are body mass index (BMI) scores measured in 9 patients who are free of diabetes and participating in a study of risk factors for obesity. Body mass index is measured as the ratio of weight in kilograms to height in meters squared. 25 27 31 33 26 28 38 41 24 The range of the BMI values is?

  • The following are body mass index (BMI) scores measured in 12 patients who are free of...

    The following are body mass index (BMI) scores measured in 12 patients who are free of diabetes and are participating in a study of risk factors for obesity. Body mass index is measured as the ratio of weight in kilograms to height in meters squared. Generate a 95% confidence interval estimate of the true BMI. 25 27      31      33      26   28      38   41   24   32   35      40

  • 1. Your Body Mass Index (BMI) is a measure of your weight relative to your height....

    1. Your Body Mass Index (BMI) is a measure of your weight relative to your height. The formula can be found here: http://www.whathealth.com/bmi/formula.html (use the Imperial U.S. Method). Write an algorithm in pseudocode to calculate and display a person's BMI accepting as input their height in feet and inches and their weight in pounds. The output of your algorithm should be as follows: a. BMI b. A statement of whether the result is underweight, normal, overweight or obese.

  • Body Mass Index Calculator

    Create a BMI calculator applications that reads 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, so the user can evaluate his/her BMI:BMI ValuesUnderweight: less that 18.5Normal: between 18.5 and 24.9Overweight: between 25 and 29.9Obese: 30 or greaterFormula for calculating BMI areBMI = weightInKilogramsheightInMeters x heightInMetersThe program is to be written in C++ langauge.I need some...

  • Weight: 131 lbs Female Height: 5 ft 2 inches Calculate, showing the math, your Body Mass...

    Weight: 131 lbs Female Height: 5 ft 2 inches Calculate, showing the math, your Body Mass Index (BMI) using the formula 'weight in kilograms divided by height in meters squared' (kg/m^2). Note: Weight in pounds divided by 2.2 = weight in kg and height in inches times .0254 = height in meters. The number is absolute and not a percentage. Based on your BMI, are you underweight, healthy weight, overweight, or obese?

  • javafx 1. Implement a BMI (Body Mass Index) server that will accept height and weight from...

    javafx 1. Implement a BMI (Body Mass Index) server that will accept height and weight from the client, calculate the BMI and return a string with the BMI and a status (l.e. normal, over weight, etc.). Build a GUI using JavaFX. You are given a working BMI class that will do the BMI calculations, etc. A single BMI client connection is sufficient. 2. Implement a JavaFX BMI client that will allow the user to enter height (in inches), weight (in...

  • 5. A person's Body-Mass Index (BMI) is calculated by dividing weight (in kilograms) by height2 (in...

    5. A person's Body-Mass Index (BMI) is calculated by dividing weight (in kilograms) by height2 (in meters). According to the book, The Changing Body, the BMI values of non-Hispanic adult males in the United States are approximately Normally distributed with mean (μ)-265 and standard deviation (o)-4.0. Find the standardized scores associated with the thresholds between different categories. a. Underweight vs. Normal (BMI 18.5) b. Normal vs. Overweight (BMI 25) c. Overweight vs. Obese (BMI 30) 6. Combine the standardized scores...

  • read instructions carefully please matlab only Write a MATLAB function for a BMI calculator that receives the inputs for body weight (lbs)and height (ft) from the user's program, calculates th...

    read instructions carefully please matlab only Write a MATLAB function for a BMI calculator that receives the inputs for body weight (lbs)and height (ft) from the user's program, calculates the BMI using the equation below, displays the BMI category, and outputs the BMI value tothe user's program W (kg) h2 (m2) BMI Display Normal if 18.5 s BMI 25 Display Overweight if 25 s BMI <30 Display Obese if BMI 2 30 Else display underweight So you will create two...

  • Using JAVAFX The application will calculate Body Mass Index (BMI) for people. It must be able...

    Using JAVAFX The application will calculate Body Mass Index (BMI) for people. It must be able to accept as input weights (in pounds or kilos), and height (in inches or centimeters). The application should have a calculate button, and should display the result as well as if the data puts the person in one of 4 categories underweight ( BMI < 18.5) , normal weight (BMI 18.5-24.9), overweight (BMI 25.0 - 29.9) or overweight (BMI > 30) For full credit...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT