Question: poly least squares.m test.least.squares.m Exercise 1 Write a Matlab function poly least.squares.m that implements the least squares method we discussed in class to approximate a

 poly least squares.m test.least.squares.m Exercise 1 Write a Matlab function poly

poly least squares.m test.least.squares.m Exercise 1 Write a Matlab function poly least.squares.m that implements the least squares method we discussed in class to approximate a data set in terms of a polynomial model of degree M. The function should be of the form function [a , err) = poly-least-squares (x,y,W Input x: vector of nodes x- [x(1) x(N)1 y: vector of data points y=[y(1) . . . y (N)] corresponding to [x(1) M: degree of the polynomial model x(N)] (x) = a(1) + a(2)2 + a(3)22 + + a(M+1)IM Output: a: Vector of coefficients representing the polynomial (1) err: Error between the model and the data in the 2-norm i-I

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!