Question: Solve this problem in Matlab... As a test case, compute sin(0.9) for up to and including eight terms-that is, up to the term x^15/15!. Utilizing
Solve this problem in Matlab...

As a test case, compute sin(0.9) for up to and including eight terms-that is, up to the term x^15/15!. Utilizing a for-loop, compute and display in sequence the values for all 8 terms as shown below. Your neatly formatted output should include the iteration number and computed term and %error (formula given below) sin x = x sin x = x - x^3/3! Sin x = x - x^3/3! + x^5/5! For each of the preceding, compute and display the percent relative error as %error = true - series approximation/true times 100% In the above equation, the true value is the value you get from your calculator. In matlabe you can computer the true value of sine using the sin() function. Part b) Modify the above program to use a while loop. Your program will terminate when the %error is less than 008. Display the final calculated value for sin (0.9) and the number of iterations (number of loops) the program took for the computation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
