fitPiecewiseLinear(​t, z, tGuess)

Computes a best-fit linear spline with arbitrary grid spacing
194 téléchargements
Mise à jour 7 mars 2017

Afficher la licence

% [tGrid, zGrid] = fitThreeLines(t, z, tMidGuess)
%
% This function fits a piecewise linear function to a data set. The number
% of knot points is fixed, but the optimization computes the optimal grid
% spacing and the value at each knot point.
%
% INPUTS:
% t = [1,n] = time stamp
% z = [1,n] = data value
% tGuess = [1,k] = guess at the knot times. Mapped to [t(1), t(end)]
%
% OUTPUTS:
% tGrud = [1, k] = knot times for best-fit linear spline
% zGriz = [1, k] = data values for best-fit linear spline
% objVal = scalar = fitting error for the best-fit solution
% exitFlag = FMINCON exit flag for data fitting
%

Citation pour cette source

Matthew Kelly (2026). fitPiecewiseLinear(t, z, tGuess) (https://fr.mathworks.com/matlabcentral/fileexchange/61915-fitpiecewiselinear-t-z-tguess), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2015b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Spline Construction dans Help Center et MATLAB Answers
Version Publié le Notes de version
1.0.0.0