Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(a) (4 points) Given input consisting of . a positive integer n, . a vector a with n+1 entries ai,a2.,an+1 . a vector y with

image text in transcribed

(a) (4 points) Given input consisting of . a positive integer n, . a vector a with n+1 entries ai,a2.,an+1 . a vector y with n entries Ji. 2. yn, and a scalarr write a MATLAB function with header function p = PolyEva1 ( n, a, y, x ) to evaluate the polynomial an+1(ry)(r 2) (ys)(r yn) n+1 j-1 using Horner's algorithm. Include a copy of your function M-file in your solution pdf. Note. Your function should use exactly 3n flops (floating-point operations) (b) (2 points) Use your function M-file from (a) to evaluate p(1.53) when n = 5 and a=[-1, 3.3. 0,-22, 5, -1.6] Include the call to the function you used to get the result

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

More Books

Students also viewed these Databases questions

Question

Developing and delivering learning that is integrated with the job.

Answered: 1 week ago