Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started