Horners scheme Write Maple andor Matlab code to implement th

Horner\'s scheme Write Maple and/or Matlab code to implement the fact that a polynomial of degree d can be evaluated in d multiplications and d additions, using Horner\'s scheme. Illustrate your code with the polynomials: X^8 - x^7 + x^4 - x^3 + x +1 x^400 - x^300 + x^200 - x^100 + 1 x^5 + x^8 + x^11 + x^14 Question: Does your Horner scheme code correctly detect the special structure of the second^2 and third^3 polynomials above?

Solution

This is an ideal code for implementationof Horner\'s scheme for finding degree of polynomial. The examples can be implemented as follows: clc clear all fprintf(\'\ ------SOLVING POLYNOMIAL USING HORNERS RULE-------\'); n=input(\'\ Enter the Degree of Polynomial\'); fprintf(\'\ Enter the coefficients from Lowest degree to Highest\'); for i = n:-1:0 fprintf(\'\ a%d = \',i); temp=input(\'\'); a(i+1)=temp; end x=input(\'\ Enter the value of x\'); p(n+1)=a(n+1); for i = n:-1:1 p(i)=(p(i+1)*x) + a(i); end fprintf(\'\ ------ANSWER-------\'); fprintf(\'\ f(x) at x=%0.2f is %0.2f\',x,p(1));
 Horner\'s scheme Write Maple and/or Matlab code to implement the fact that a polynomial of degree d can be evaluated in d multiplications and d additions, usin

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site