I'm trying to get the residual error from a linear fit between two variables and the residuals I get from the regress function make no sense and don't match what I get from the data fitting gui (which looks correct). What is the difference in the procedures here and how can I programmatically get the residuals I see through the data fitting menu option?
MATLAB: Residuals from Regress
MATLABregressresiduals
Best Answer