Question: Function definition: BMI calculator I'm not sure what I am doing wrong. ALLENGE TIVITY 7.1.2: Function definition: BMI calculator. This tool is provided by a
Function definition: BMI calculator
I'm not sure what I am doing wrong. 


ALLENGE TIVITY 7.1.2: Function definition: BMI calculator. This tool is provided by a third party. Though your activity may be recorded, a page refresh may be needed to fill the banner. 0/2 Function definition: BMI calculator Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able to calculate the BMI of a single individual, or a group of inviduals provided as a row array. Relevant equations are listed below: BMI = mass in kg / (height in meters)^2 1 meter = 100 centimeters Function Save C Reset DI MATLAB Documentat Function Save C Reset MATLAB Documentatic 1 % Define a function CalculateBMI 2 % Input: masskg: Mass in kg 3 % heightCm: Height in cm 4 % Output: bodyMass Index: Resulting BMI given mass and height 5 function bodyMass Index = CalculateBMI (masskg, heightCm) 6 CalculateBMI = masskg./((heightCm./100).^2); 7 end Code to call your function C Res 1 CalculateBMI (45, 145) Assessment: 2 of 4 Tests Passed (50%) Submit Check if function definition exists 25% (259 Check function's input and output arguments 25% (259 X Check if CalculateBMI(45, 145) returns 21.4031 0% (259 0% (259 * Check if CalculateBMI([75, 90, 118], [178, 180, 200]) returns [23.6713, 27.7778, 29.5] Total. 50
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
