function [BMI,category,target_weight]=mybmi(W,h) BMI=round(W/h^2*703); if (BMI<19) category='underweight'; target_weight=round(19*h^2/703); end if (BMI>=19) & (BMI<=25) category='healthy'; target_weight=round(W); end if (BMI>25) category='overweight'; target_weight=round(25*h^2/703); end