In: Mechanical Engineering
Write a MATLAB function that uses my_sine(x,n) to plot the approximation of the sinefunction from−3π/2 to 3π/2 with increments equal to Δx,where Δx and n(the number ofterms used in the series approximation) should be input arguments of the function andshould be specified by the user.
Below is the code and image of matlab run code. Please give feedback.
You can use here x = -4.7:.01:4.7 for giving input.
Example -