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

4 visualizzazioni (ultimi 30 giorni)
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.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 27 Giu 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));

Più risposte (0)

Categorie

Scopri di più su Smoothing in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by