Question: Please solve the following question using Matlab Language. I posted a picture from my lecture to show what X ,Y, and A are. Here are
Please solve the following question using Matlab Language. I posted a picture from my lecture to show what X ,Y, and A are.
Here are some hints for the following problem:
% Be careful: xdata and ydata are nx1 column vectors.
% Set up the matrices XA = Y, use A = X\Y. (Please look at the picture for what X,Y,and A are)
% cStar - (p+1)x1. Keep this dimensioning in mind.
% err - Use the command norm(X*A-Y,2).
% flag - Should return 1 if everything is okay, -1 if an error exists.
% If size xdata and ydata are not the same -> flag = -1, cStar = empty,
err= Inf.
% If no of coefficients of polynomial (p+1) are more than no of data points, then error so same thing.
Thanks!!


2 3 3 ayyy 2 3 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
