I have some data where I need to perform a simple linear regression. The problem is that there are outliers that I need to eliminate so I use cftool
and remove them from the regression. I have the following code
cftool(avg_strain_values,avg_stress_values);
When cftool
loads up the standard equation is a polynomial which I have to manually change to y=ax+b
. My question is this: is there a way to call cftool
and change the equation automatically? Or do I have to do it manually every time? In the documentation and around the web there is mention of fit
and that can do it but when I tried it, I can't eliminate outliers.