Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

MATLAB Coding Exercise. The Taylor polynomial centered at z0 of a polynomial p can be computed using Horner's method. In essence, you keep dividing the

MATLAB Coding Exercise.

image text in transcribed

image text in transcribed

image text in transcribed

The Taylor polynomial centered at z0 of a polynomial p can be computed using Horner's method. In essence, you keep dividing the polynomial by the term ( zz0 ) and keep track of the coefficient b1. For an example of this, see page 114 from the textbook: z44z3+7z25z2=(z3)4+8(z3)3+25(z3)2+37(z3)+19. Your job is to implement the complete Horner's algorithm from the pseudo code found in the textbook. input n,(ai:0in),z0 for k=0 to n1 do for j=n1 to k step 1 do ajaj+z0aj+1 end do end do output (ai:0in) Your function should accept the following inputs: a - vector containing the coefficients of the polynmial of degree n, of size 1 by (n+1), where the coefficients of the polynomial are listed from lowest order to highest order. For example, p(z)=1/2+z+2z2+3z3 is represented by a=[1/2,1,2,3] z0 - where the Taylor polynomial will be centered. Your function should return the following output: a - vector containing the coefficients of the Taylor polynomial of degree n centered at z0, where the coefficients of the polynomial are listed from lowest order to highest order. For example, z44z3+7z25z2=(z3)4+8(z3)3+25(z3)2+37(z3)+19,z0=3 is represented by a =[19,37,25,8,1] Function ? Dave C Reset El MATLAB Documentation Code to call your function ? C Reset \( \begin{array}{ll}1 & a=\left[\begin{array}{lllll}-2 & -5 & 7 & -4 & 1\end{array} ight] ; \\ 2 & z 0=3 ; \\ 3 & c=\text { horner_complete }(a, z 0) ;\end{array} \)

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

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

Students also viewed these Databases questions

Question

Differentiate between prejudice and discrimination.

Answered: 1 week ago

Question

true or false, a tuple is a named column of a relation

Answered: 1 week ago

Question

Discuss the steps in human resource planning.

Answered: 1 week ago