The function Sine is defined as:
where x is an angle in radians
Write a Matlab script program to compute the sinus valueof any angle as the following:
- The program should run always until the user enters -1 to exit from the program.
- A sk user to enter: Number of elements (N) that should beincluded in the sum
- C heck that N is a positive integer . [ Hint: use (round (N) - N) or mod(N,1) ]
- A sk user to select to enter the angle, X ,in degrees or radians
- A sk user to enter the value of X , it couldbe scalar or vector .
- Using switch/if and loops, calculate the value of sin(X).
- P rint the angle in degrees, the equivalent angle in radiansand the sinus value for this angle. Â Â