%-----------------------------------------------------------------------
% Script: Sine Table
% Prints a short table of sine values
clc
n=30;
x=linspace(0,1,n);
y=sin(2*pi*x);
disp(' ')
   disp(        '  k        x(k)   sin(x(k))')
   disp(        '---------------------------------------')
for k=1:n
   degrees = (k-1)*360/(n-1);
   disp(sprintf(' %2.0f        %3.0f   %8.5f    ',k,degrees,y(k)))
end
disp(' ')
disp(' x(k) is given in degrees ')
disp(sprintf(' One Degree = %7.5e  radians ',pi/180))
