Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using MATLAB I will appreciate if you show me your commands and results after yo

ID: 3821773 • Letter: U

Question

Using MATLAB I will appreciate if you show me your commands and results after you run it lhe obesity of a human is measured by the Body Mass Index (BM). In body standard units, is calculated by the formula BMI 703 W/H2 where W is weight in pounds, and H is height in inches. The obesity classification is: BMI Classification Below 18.5 Underweight 18.5 to 24.9 Normal 25 to 29.9 overweight 30 and above Obese Write a MATLAB program in a script file that calculates the BMI of a person. The program asks the person to enter his or her weight (lb) and height (in.). The program displays the result in a sentence that reads: "Your BMI value is XXX, which classifies you as SSSS," where XXX is the BMI value rounded to the nearest tenth, and SSSS is the corresponding classification. Use the program for determining the obesity of the following two individuals: (a) A person 6 ft 2 in. tall with a weight of 180 lb. (b) A person 5 ft 1 in. tall with a weight of 150 lb. Use fprintf to display the text and data. The data should be displayed in f format with one decimal digit.

Explanation / Answer

w = input("Enter weight in pound:"); % Scan weight
h = input("Enter height in inches:"); % Scan height
bmi = (703 * w )/(h*h);
if(bmi < 18.5)
fprintf("Your BMI value is %f, which clissifies you as Underweight",bmi);
elseif(bmi < 25)
fprintf("Your BMI value is %f, which clissifies you as Normal",bmi);
elseif(bmi < 30)
fprintf("Your BMI value is %f, which clissifies you as Overweight",bmi);
else
fprintf("Your BMI value is %f, which clissifies you as Obese",bmi);
end
fprintf(" ");

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote