p1 = person('王建民', '男', 1.93, 95) p2 = person('姚明', '男', 2.26, 134) fprintf('王建民的 BMI = %g\n', bmi(p1)); fprintf('姚明的 BMI = %g\n', bmi(p2));