% Creates a table of angles in degrees and radians, together with the cos
% and sin of these angles.  The user is prompted to enter the range of
% angles.

clear; clc;

degLo = input('Enter the starting angle (degrees)');
degHi = input('Enter the ending angle (degrees)');
n     = input('How many entries?');

deg = linspace( degLo, degHi, n )';
rad = deg * pi/180;

results = [ deg, rad, cos(rad), sin(rad) ];
format short;
disp('degrees      radians       cos       sin ');
disp('-----------------------------------------');
disp(results);