Professional Documents
Culture Documents
As a student of the University of the Philippines, I pledge to act ethically and uphold the value of
honor and excellence.
I understand that suspected misconduct on this Assignment will be reported to the appropriate
office and if established, will result in disciplinary action in accordance with University rules,
policies and procedures. I may work with others only to the extent allowed by the Instructor.
Write a MATLAB code that generates the Nth degree polynomial least squares
matrix.
INPUT:
1. (x,y) dataset
2. Degree of polynomial
OUTPUT:
Least squares matrix
MATLAB CODE
%The graph of y vs x
plot(x_i,y_i, 'or', 'MarkerSize',5);
%Generate the Vander Matrix for x_i
x_vander = fliplr(vander(x_i));
SAMPLE OUTPUT