Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use MATLAB to write a function subroutine horner_yourlastname(a, x0, d) that uses Horners algorithm to evaluate a polynomial at a given point x0. This code

Use MATLAB to write a function subroutine horner_yourlastname(a, x0, d) that uses Horners algorithm to evaluate a polynomial at a given point x0.

This code should have three inputs in the order specified above:

a: a vector of coefficients of the polynomial of interest. The first element of the vector should be the leading coefficient, and the last element should be the trailing coefficient. i. e. The polynomial p(x) = anx n + an1x n1 . . . a1x + a0 should have associated vector a = [an, an1, . . . , a1, a0].

x0: the point at which the polynomial is to be evaluated.

d {0, 1}: a toggle that allows the function to be evaluated at the point if d = 0 or its derivative to be evaluated at the point if d = 1.

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions