clear; clc;

% request information from the user:
%  number of points, starting position,ending position.
n          = input('enter the number of points: ');
thetaStart = input('enter the starting angle (deg): ');
thetaEnd   = input('enter the ending angle (deg): ');

% create an array holding all of the angles in degrees,
% then convert it into radians.
deg = linspace( thetaStart, thetaEnd, n )';
rad = deg * pi/180;

% calculate the sin and cos of the angles.
cosTheta = cos( rad );
sinTheta = sin( rad );

% pack the results into an array that we can
% easily display in the command window.
result = [ deg rad cosTheta sinTheta ];

% dump out the results.
disp('degrees      radians      cos      sin');
disp('--------------------------------------');
disp(result);