Piecewise linear least square fit

Fit experimental data with linear piecewise continuos function with given x-axis break points.
ダウンロード: 5.4K
更新 2013/3/22

ライセンスの表示

Generates 1-D look-up table (LUT) optimal (least-square sense with continuity constraint) y-axis points from experimental (x,y) data given a vector of x-axis break points.

Note that x-axis break points should be chosen such that every bin has enough data points for correct estimation.

Please see lsq_lut_piecewise_test.m for an example with (synthetic) experimental data points.

No toolbox required.

% LSQ_LUT_PIECEWISE Piecewise linear interpolation for 1-D interpolation (table lookup)
% YI = lsq_lut_piecewise( x, y, XI ) obtain optimal (least-square sense)
% vector to be used with linear interpolation routine.
% The target is finding Y given X the minimization of function
% f = |y-interp1(XI,YI,x)|^2
%
% INPUT
% x measured data vector
% y measured data vector
% XI break points of 1-D table
%
% OUTPUT
% YI interpolation points of 1-D table
% y = interp1(XI,YI,x)
%

引用

Guido Albertin (2024). Piecewise linear least square fit (https://www.mathworks.com/matlabcentral/fileexchange/40913-piecewise-linear-least-square-fit), MATLAB Central File Exchange. 取得済み .

MATLAB リリースの互換性
作成: R2006b
すべてのリリースと互換性あり
プラットフォームの互換性
Windows macOS Linux
カテゴリ
Help Center および MATLAB AnswersLeast Squares についてさらに検索
謝辞

ヒントを与えたファイル: r-DFA : Robust Detrended Fluctuation Analysis

Community Treasure Hunt

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

Start Hunting!
バージョン 公開済み リリース ノート
1.0.0.0