Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a matlab question please include code and answers. thank you We already have a function file to compute body mass index (BMI). Now

This is a matlab question please include code and answers. thank you

We already have a function file to compute body mass index (BMI). Now write a .m function file that takes height, weight, gender (0 for female, 1 for male), and age and outputs the body fat percentage (BFP) (another silly metric). BFP = 1.2BMI + 0.23(age) 10.8(gender) 5.4 Write your function so that it calls the BMI function you wrote earlier.

Code for BMI function

function b=BMI_Index(weight, height)

w=weight

h=height

H=w/h^2

b=703*H

(a) Abraham Lincoln was a 64, 180 lb, 52 year-old president. What was his BFP?

(b) NFL MVP Peyton Manning was a 65, 230 lb, 40 year-old man when he won the Superbowl. What was his BFP?

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions