BMI Category
function [ bmi, category ] = bmicategory(b,a)
% Bmicategory(height,weight): This function calculates the BMI of a person and returns the value along
% with the BMI category.
 %allocates varaiables
%weight(lb)=a
%height(ft)=b
 %calculate BMI
bmi=(a*4.88)/(b^2);
 %if-loop to categorize the values.
if (bmi<15);
  category=('Very severely underweight');
elseif (15<bmi) && (bmi<16);
  category=('Severely underweight')
elseif (16<bmi) && (bmi<18.5)
  category=('Underweight')
elseif (18.5<bmi) && (bmi<25)
  category=('Normal')
elseif (25<bmi) && (bmi<30)
  category=('Overweight')
elseif (30<bmi) && (bmi<35)
  category=('Obese Class I (Moderately obese)')
elseif (35<bmi) && (bmi<40)
  category=('Obese Class II (Severely obese)')
elseif (40<bmi)
  category=('Obese Class III (Very severely obese')
end
% This gives the BMI and category as the output.
end
%% MHOMO KADIRI (C)2013














