1

I use cftool to fit my data using a custom equation. I could see the fit and also the corresponding residual data of the fit. Since the residuals are absolute values, I am also interested in the percentage deviation with respect to data.

Of course, I could implement the equation and the compare it with data through a separate script. But, is there a more easier to check the percentage residuals?

SKPS
  • 5,433
  • 5
  • 29
  • 63

1 Answers1

1

I searched a bit and a way to obtain residuals is mentioned here.

Basically, export the fit to workspace using: Fit->Save to Workspace. Then, the percentage error can be computed as:

residual = z - fittedmodel(x,y);
percentageResidual = residual./z*100;
SKPS
  • 5,433
  • 5
  • 29
  • 63