Answered step by step
Verified Expert Solution
Question
1 Approved Answer
( 4 ) outputs the following information to a text file named BMI . txt: The output file should contain 2 3 rows and four
outputs the following information to a text file named BMI txt:
The output file should contain rows and four columns. The first row is the heading.
Each row after that describes the height in centimetres weight in kilograms the
BMI value, and the BMI category of the person in the corresponding row of the input
file. Hint: you can create such a file with fprintf and a loop statement.
What to submit for this question: Please submit your script file named aqm and the
BMI.txt file generated by your program. points You are given a text file named HeightWeightIP.txt that contains the
heights and weights of people in the following format:
where the first number in a row is a person's height in inches and the second number is the
person's weight in pounds. The file can be downloaded at the page where you downloaded this
assignment file. Write a MATLAB script file named aqm that
reads the data in the HeightWeightIP. txt file
computes the body mass index BMI of each person based on hisher height and
weight. For this step, your program should call the IPtoCK function that you wrote
for the last question to convert the height in inches and weight in pounds to the
corresponding centimetres and kilograms. After the conversion, your program should
calculate the BMI value of the person using the following formula:
BMI
where is the person's weight in kilogram and is the person's height in
centimetres.
determines the BMI category that each person belongs to by using the following
information:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started