Question: Using MatLab Background: Polynomial interpolation consists of determining the unique (n-1order polynomial that fits n data points. Such polynomials have the general form: Where the

Using MatLab

Using MatLab Background: Polynomial interpolation consists of determining the unique (n-1order polynomial

that fits n data points. Such polynomials have the general form: Where

Background: Polynomial interpolation consists of determining the unique (n-1order polynomial that fits n data points. Such polynomials have the general form: Where the p's are unlnown constant coefficients. If we have n pairs of datasets that passes through the polynomial, f(x), a straightforward way for computing the constant coefficients is substituting the given pairs into the equation and generate the n linear algebraic equations, as a function of the coefficients pl p2....pn The resulting linear equation looks n-1 x y1 y2 The coefficient matrix is known to be ill-conditioned (cf 11.22 for matrix condition). Assignment: Write a function that solve for the coefficients of an nh order polynomial equation. The accuracy of these coefficients depends on the condition mumber (see Case Study 11.3). Use VPA) (Variable Precision Arithmetic) to limit the accuracy of your output. You may use length() to determine the number of data point (n) function [p] = myPolyInv (x, y) % solve for the coefficients of an nth order polynomial interpolation % inputs x = vector of x input points y = vector of y input points, x and y have the same dimension % output p coefficients pl to pn with the available accuracy [c] myCondition (A); % A= coefficient matrix end % end of function Write a sub function, myCondition, to calculate the matrix condition number based on the coefficient matrix and inverse matrix calculated by using a second sub function, mylnverse. For this assignment, use the Frobenius norm to determine the condition number. You may not use the Matlab built-in functions for Background: Polynomial interpolation consists of determining the unique (n-1order polynomial that fits n data points. Such polynomials have the general form: Where the p's are unlnown constant coefficients. If we have n pairs of datasets that passes through the polynomial, f(x), a straightforward way for computing the constant coefficients is substituting the given pairs into the equation and generate the n linear algebraic equations, as a function of the coefficients pl p2....pn The resulting linear equation looks n-1 x y1 y2 The coefficient matrix is known to be ill-conditioned (cf 11.22 for matrix condition). Assignment: Write a function that solve for the coefficients of an nh order polynomial equation. The accuracy of these coefficients depends on the condition mumber (see Case Study 11.3). Use VPA) (Variable Precision Arithmetic) to limit the accuracy of your output. You may use length() to determine the number of data point (n) function [p] = myPolyInv (x, y) % solve for the coefficients of an nth order polynomial interpolation % inputs x = vector of x input points y = vector of y input points, x and y have the same dimension % output p coefficients pl to pn with the available accuracy [c] myCondition (A); % A= coefficient matrix end % end of function Write a sub function, myCondition, to calculate the matrix condition number based on the coefficient matrix and inverse matrix calculated by using a second sub function, mylnverse. For this assignment, use the Frobenius norm to determine the condition number. You may not use the Matlab built-in functions for

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!