FitData#
- class FitData(rawData)#
Bases:
handleFitDataabstract base for data fitting operations.Provides a framework for fitting mathematical functions to experimental data using MATLAB’s curve fitting toolbox. Supports customizable fit parameters, bounds, and optimization settings.
Example1:
% Create a Gaussian fit object data = [x, y]; % n x 2 array of x,y coordinates gaussianFit = GaussianFit1D(data); gaussianFit.do(); gaussianFit.plot();
Example2:
% Customize fit parameters fitObj = LinearFit1D(data); fitObj.IsOverride = true; fitObj.StartPointOverride = [1.0, 0.5]; fitObj.do();
- Constructor Summary
- Property Summary
- Coefficient double#
Coefficient resulted from fit
- CoefficientName string#
Names of fit coefficients
- FitFormula string#
Mathematical formula for the fit function
- Func#
MATLAB fittype object
- Gof#
Goodness of fit
- IsOverride logical = false#
Whether to use override parameters
- Lower (1,:) double#
Fit coefficient lower bound
- LowerOverride (1,:) double#
Fit coefficient lower bound override
- MaxFunEvals (1,1) double = 2000#
Maximum function evaluations
- MaxIter (1,1) double = 2000#
Maximum iterations for optimization
- MinimumDataSize double#
Minimum number of data points required
- RawData double#
Input data for fitting
- Result#
MATLAB fitobject
- StartPoint (1,:) double#
Fit coefficient start point
- StartPointOverride (1,:) double#
Fit coefficient start point override
- TolFun (1,1) double = 1E-16#
Function tolerance for optimization
- Upper (1,:) double#
Fit coefficient upper bound
- UpperOverride (1,:) double#
Fit coefficient upper bound override
- Method Summary
- clearOverride()#
Clear all override parameters.
Example:
fitObj.clearOverride();
- setDefaultOverride()#
Set override parameters to default values.
Example:
fitObj.setDefaultOverride();