主要内容

Fit Postprocessing

Plotting, outliers, residuals, confidence intervals, validation data, integrals and derivatives, generate MATLAB®代码

After fitting a curve or surface, use postprocessing methods to analyze if the fit to the data is accurate. After creating a fit, you can apply various postprocessing methods for plotting, interpolation, and extrapolation; estimating confidence intervals; and calculating integrals and derivatives. You can also use postprocessing methods to determine the outliers of a fit.

You can use Curve Fitting Toolbox™ functions to evaluate a fit by plotting the residuals and the prediction bounds. For more information, see评估a Curve Fit。要与拟合和生成MATLAB代码进行交互性,请使用曲线拟合应用程序。

Apps

曲线拟合 Fit curves and surfaces to data

Functions

cfit 构造函数cfitobject
coeffnames Coefficient names ofcfit,sfit, orfittypeobject
系数 Coefficient values ofcfit或者sfitobject
confint Confidence intervals for fit coefficients ofcfit或者sfitobject
differentiate Differentiatecfit或者sfitobject
Feval 评估cfit,sfit, orfittypeobject
integrate 整合cfitobject
plot Plotcfit或者sfitobject
predint Prediction intervals forcfit或者sfitobject
probvalues Problem-dependent parameter values ofcfit或者sfitobject
quad2d Numerically integratesfitobject
sfit 构造函数sfitobject

Topics

在曲线拟合应用中创建多个拟合

工作流程,用于完善您的拟合度,比较多个拟合以及使用统计数据来确定最佳拟合度。

Explore and Customize Plots

在曲线拟合应用中,显示拟合,残留,表面或轮廓图;显示预测边界和多个图,使用Zoom,PAN,DATA CURSOR和离群值模式;更改轴限制和打印图。

Remove Outliers

Remove points or exclude by rule in Curve Fitting app or using thefitfunction, including excluding outliers by distance from the model, using standard deviations.

Select Validation Data

将您的拟合与验证数据或曲线拟合应用中的测试集进行比较。

Generate Code and Export Fits to the Workspace

Generate MATLAB code from an interactive session in the Curve Fitting app, recreate fits and plots, and analyze fits in the workspace.

评估a Curve Fit

此示例显示了如何使用曲线拟合。

评估表面拟合

此示例显示了如何与表面拟合一起工作。

Evaluating Goodness of Fit

After fitting data with one or more models, evaluate the goodness of fit using plots, statistics, residuals, and confidence and prediction bounds.

Compare Fits in Curve Fitting App

Search for the best fit by creating multiple fits, comparing graphical and numerical results including fitted coefficients and goodness-of-fit statistics, and analyzing your best fit in the workspace.

Compare Fits Programmatically

This example shows how to fit and compare polynomials up to sixth degree using Curve Fitting Toolbox, fitting some census data.

Residual Analysis

The residuals from a fitted model are defined as the differences between the response data and the fit to the response data at each predictor value.

Confidence and Prediction Bounds

曲线拟合Toolbox software lets you calculate confidence bounds for the fitted coefficients, and prediction bounds for new observations or for the fitted function.

Differentiating and Integrating a Fit

This example shows how to find the first and second derivatives of a fit, and the integral of the fit, at the predictor values.

Featured Examples