% MyTrig with switch and menu statement
% clean up
clear all;
close all;

% get values from user
angle = input('Please enter the angle you wish to compute: ');
degORrad = menu('Please select the units for your angle:','Degrees','Radians');

% compute the sin/cos
switch degORrad
    case 1
        sin_comp = sind(angle);
        cos_comp = cosd(angle);
    case 2
        sin_comp = sin(angle);
        cos_comp = cos(angle);
end

% display results
fprintf('The sine of your angle is: %0.4f\n',sin_comp);
fprintf('The cosine of your angle is: %0.4f\n',cos_comp);