Question: using matlab. thanks! (1) Write a script file named sineseries.m that computes the value of sin x) at a given x using n terms of

 using matlab. thanks! (1) Write a script file named sineseries.m that

using matlab. thanks!

(1) Write a script file named sineseries.m that computes the value of sin x) at a given x using n terms of the series expansion of the sine function: 2k-1 sin(x) = x-31 + x,-... k-1 (-1 k-I 3! 5! (2k -1)! Save the file. Type help sineseries to see if MATLB can access your script file. Now compute sin pi/6) with n= 1,5,10,20. Compare the results. Do the same for some other x of your choice. (2) Take the script file in problem (1) and convert it into a function file, using x and n to be inputs, and y as the output. Call the function as sine_series, and run it for n-1, 5, 10, 20 and x=pi/6. Do the same for other x of your choice

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!