How can I export the residuals from the Basic Fitting Interface Window to the MATLAB workspace?

4 visualizaciones (últimos 30 días)
There is an option to send the norm of the residuals to the workspace from the second panel (click the arrow key on the first panel to get here), but not one for sending the residuals themselves.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 27 de Jun. de 2009
This enhancement has been incorporated in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
As a workaround, use "Save To Workspace" on the second panel to save the fit to the workspace (say it is called fit1).
Then if the fit is one of the two spline fits, and x and y are the data vectors, use:
residuals = abs(y - ppval(fit1.coeff,x));
If the fit is one of the polynomials, use:
residuals = abs(y-polyval(fit1.coeff,x));

Más respuestas (0)

Categorías

Más información sobre Smoothing en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by