Question: 1. Additional Example: Explain, line-by-line, the following code which uses the infinite series approximation of sin(x) with N= 10 and evaluates the series at the

 1. Additional Example: Explain, line-by-line, the following code which uses the

1. Additional Example: Explain, line-by-line, the following code which uses the infinite series approximation of sin(x) with N= 10 and evaluates the series at the points 0, 0.1, 0.2, 0.3, 0.4 and 0.5: V = 0.0:0.1:0.5; sinx = zeros(size()); N = 10; range = 0: N; ints = 2*range + 1; for n = range sinx = sinx + (-1)^n*y.ints (n+1)... I (factorial(ints(n+1))); end As a reminder: sinx= vim -120+)? v. Code correction (HW 3 problems 1 & 2) 1. Additional Example: Debug the code which is supposed to plot the polynomial x4-1 between x=-2 and x = 2 using 20 points. x = -2:0.1:2; c = [1 0 0 -1]; y = polyval (c,x); plot(y,x)

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!