Mohamed Zamreen Mohamed Ramzeen - MATLAB Cody - MATLAB Central

Mohamed Zamreen Mohamed Ramzeen

35568
Rank
2
Badges
116
Score
1 – 14 of 14

Mohamed Zamreen Mohamed Ramzeen submitted a Comment to Problem 44945. Calculate BMI

@Christian Thank you very much for the reply. It worked after replacing as you said

on 30 Apr 2023

Mohamed Zamreen Mohamed Ramzeen submitted a Comment to Problem 44945. Calculate BMI

function bmi = bmi_calculator(hw) % Convert the height values from inches to meters height = hw(:,1).*2.54/100 % Convert the weight values from lbs to kilograms weight = hw(:,2)./2.2 % Calculate the bmi for height and weight combination and return the output variable 'bmi' bmi = weight/height.^2; end can anyone help me here? I am getting this error Error using assert The condition input argument must be convertible to a scalar logical. Error in Test2 (line 4) assert(all(abs(bmi_calculator(hw) - bmi_correct) < 1e-4))

on 28 Apr 2023

Mohamed Zamreen Mohamed Ramzeen received Solver badge for Solution 10943893

on 18 Apr 2023

1 – 14 of 14
Go to top of page