Fit a given set of data-points to a line. Returns the fitted data points, slope and the intercept of the line.
[yfit,m,c] = linefit(x,y)
an array of x axis points
an array of y axis points
an array that contains the fitted points
slope of the fitted line
intercept of the fitted line
Fit a given set of data-points to a line.
Returns the fitted data points, slope and the intercept of the line.