Skip to content
Prev 105771 / 398502 Next

A smal fitting problem...

If you really want to fit a horizontal line then the best estimate 
(meaning least squares) for b is mean(y), regardless of the actual x 
values, which becomes clear if you look at your design matrix / 
regressor matrix  .
In general least squares regression could be done with lsfit(). In your 
case the design matrix (X matrix) is a simple vector of ones.


K?re Edvardsen schrieb: