Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

Consistently develop management talent.

Answered: 1 week ago

Question

Create a refreshed and common vision and values across Europe.

Answered: 1 week ago

Question

Provide the best employee relations environment.

Answered: 1 week ago