1. Write a user-defined MATLAB function called ConvertWeightHeight.m, with two input and two output arguments that deter

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

1. Write a user-defined MATLAB function called ConvertWeightHeight.m, with two input and two output arguments that deter

Post by answerhappygod »

1 Write A User Defined Matlab Function Called Convertweightheight M With Two Input And Two Output Arguments That Deter 1
1 Write A User Defined Matlab Function Called Convertweightheight M With Two Input And Two Output Arguments That Deter 1 (254.38 KiB) Viewed 38 times
1. Write a user-defined MATLAB function called ConvertWeightHeight.m, with two input and two output arguments that determines the height in meter (m) and weight in kilograms (kg) of a person from his/her height in feet (ft.) and weight in pounds (lb). (10 pts) 2. Create a class called Body Mass Index.m with specific properties and methods shown in the MATLAB tutorial OOP section. Calculate and output the BMI value of a 5ft. 6in, person who weighs 180 lbs. Use the ConvertWeightHeight function that you wrote previously for the unit conversion. Hint: You may think of 5ft. 6in. as a decimal number as the input into your ConvertWeightHeight.m function. (20 pts) 3. Generate a sample dataset with the weight and height of 100 people. Calculate their BMIs. Some useful functions that you can use to generate the dataset are: linspace() https://www.mathworks.com/help/matlab/ref/linspace.html rand() https://www.mathworks.com/help/matlab/ref/rand.html ● Plot the BMIs for the 100 people. Add x-label ('Person #') and y-label ('BMI Value') and title ('Population BMI') to the plot. Ensure your BMI values are within a reasonable (or humanly possible) range, you can use this as a reference: https://www.cdc.gov/healthyweight/asses ... index.html (20 pts) 4. Create a script called Probleml_LastName.m to store the code you wrote for Parts 2 and 3. The person's BMI value in Part 2 and the plot in Part 3 should be generated after running the script. Include the answer for Part 2 in the script as a comment. Save the plot as PopulationBMI. fig. Avoid outputting the BMI values for 100 people.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply