Least-Squares Fitting Matlab

No.12290195 ViewReplyOriginalReport
Hello guys, we have a problem with Matlab functions.

Me and my friend are trying to do the Least-squares fitting for the equation:

y = C1 x2 + sin(x)

with these vectors:

x= [-5 -4 -3 -2 -1 0 1 2 3]
y= [2.5 16.3 2.8 -1.5 -4.1 -0.8 4.8 3.2 -4.3]

Any hints or solutions? We need a graph of points and curves, and also the summary of these squares.