Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a program that calculates trigonometric values The program allows the user

ID: 3673731 • Letter: W

Question


Write a program that calculates trigonometric values The program allows the user to select beginning and ending values for a range of degrees and an increment between these ranges (ex. 24 degrees to 60 degrees in steps of 5 degrees). Calculate the sine, cosine and tangent of the angles. The output should be in fixed point notation, rounded to four decimal places of precision The values entered must be between 0 and 89 degrees. Output table to file The following information should be written to the output file:

Explanation / Answer

program:

min=input('Enter minimum degree greater than or equal to zero:');
max=input('Enter maximum degree less than 90 :');
if (min>=0) && (max<=89)
disp('Angle(degrees) Angle(radians) sin cos tan');
for x=min:5:max

r = (x*pi)/180;
sy=sin(r);
cy=cos(r);
ty=tan(r);
fprintf(' %.4f %.4f %.4f %.4f %.4f ',x,r,sy,cy,ty);
end
end

output:

Enter minimum degree greater than or equal to zero:24
Enter maximum degree less than 90 :60
Angle(degrees) Angle(radians) sin cos tan
24.0000 0.4189 0.4067 0.9135 0.4452   
29.0000 0.5061 0.4848 0.8746 0.5543   
34.0000 0.5934 0.5592 0.8290 0.6745   
39.0000 0.6807 0.6293 0.7771 0.8098   
44.0000 0.7679 0.6947 0.7193 0.9657   
49.0000 0.8552 0.7547 0.6561 1.1504   
54.0000 0.9425 0.8090 0.5878 1.3764   
59.0000 1.0297 0.8572 0.5150 1.6643   

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote