%example 9.3
%create a table of degrees to radians
clear, clc
%use a while loop for the calculations
k=1;
while k<=37
    degree(k) = (k-1)*10;
    radians(k) = degree(k)*pi/180;
    k=k+1;
end
%create a table
table = [degree;radians];
%send the table to the command window
disp('degrees to radians')
disp (' degrees  radians')
fprintf('%8.0f %8.2f \n', table)
degrees to radians
 degrees  radians
       0     0.00 
      10     0.17 
      20     0.35 
      30     0.52 
      40     0.70 
      50     0.87 
      60     1.05 
      70     1.22 
      80     1.40 
      90     1.57 
     100     1.75 
     110     1.92 
     120     2.09 
     130     2.27 
     140     2.44 
     150     2.62 
     160     2.79 
     170     2.97 
     180     3.14 
     190     3.32 
     200     3.49 
     210     3.67 
     220     3.84 
     230     4.01 
     240     4.19 
     250     4.36 
     260     4.54 
     270     4.71 
     280     4.89 
     290     5.06 
     300     5.24 
     310     5.41 
     320     5.59 
     330     5.76 
     340     5.93 
     350     6.11 
     360     6.28