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

4 ビュー (過去 30 日間)
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.

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 6 月 27 日
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));

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSmoothing についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by