This question is closed. Reopen it to edit or answer.
how can i obtain least squares polynomial yn?
1 view (last 30 days)
hello everyone, i have data which is uploded on matlab but i dont have function about this data.I just plot the graph but i dont know how to code
question: Obtain the least squares polynomial yn of degree n = 2, 5, 10, 30 which fits the training data. Then use MATLAB’s polyfit function to find the regression polynomial yp of the same degree. Plot data, yp and your approximation yn on the same plot and look at the maximum of the absolute error and the relative error. Comment on the results.I give plot and data which includes x and y below.Thanks a lot