data = load('player_stats.txt');    % loads the player data in the variable <code>data</code>
[R C] = size(data);                 % Get the number of rows R and columns C 
if C < 4 
    error('Not enough player data to continue. Each row needs: num ft in lbs');
end
for r = 1 : R
    num = data(r,1);                % Get the player's number from the data matrix
    ht  = data(r,2)*12 + data(r,3); % Get the player's height (in)
    wt  = data(r,4);                % Get the player's weight (lbs) 
    bmi = BMI_standard(ht,wt);      % Call the BMI_standard function to calculate
    disp(['Player ' num2str(num) '''s BMI is ' num2str(bmi)]);
end
