I have plotted x vs y and obtained a plot of points, now I'm trying to fit a curve to my data using a nonlinear polynomial of order 4, the coeficiants are unknown.
I aim to obtain the regression coefficient as well.
Any idea how it is possible to do this? what are the suitable matlab functions to plot the fitting curve and to obtain the regression coeficient?
I already tried polyfit, but is it correct? if yes then how to proceed?