fitSplineToData

バージョン 1.1.0.0 (11.1 KB) 作成者: Matthew Kelly
Fit a cubic spline to a data set by solving a QP, with option to constrain boundary conditions.
ダウンロード: 136
更新 2017/8/17

ライセンスの表示

% soln = fitSplineToData(problem)
%
% Fit a cubic spline to a data set. The user can specify boundary
% constraints on the value, slope, and curvature along each dimension.
% The spline is computed using a quadratic program, minimizing the fitting
% error between the spline and the data set, as well as minimizing the
% integral of the jerk-squared along the spline.
%
% This function can be used to compute smooth first and second derivatives
% of a noisy data set, since it returns splines for the slope and curvature
% as well as the value of the data.
%
% INPUTS:
% problem.tData = [1, nData] = time-stamps for data
% problem.xData = [nState, nData] = time-stamps for data
% problem.xLow = [nState, 1] or [] = initial position
% problem.xUpp = [nState, 1] or [] = final position
% problem.vLow = [nState, 1] or [] = initial velocity
% problem.vUpp = [nState, 1] or [] = final velocity
% problem.aLow = [nState, 1] or [] = initial acceleration
% problem.aUpp = [nState, 1] or [] = final acceleration
% problem.smoothing = weight on jerk-squared objective function
% problem.tKnot = [nKnot, 1] = knot times for spline
%
% OUTPUTS:
% soln.pp.x = Matlab pp-spline for the position
% soln.pp.v = Matlab pp-spline for the velocity
% soln.pp.a = Matlab pp-spline for the acceleration
% soln.grid.t = problem.tData = time-grid from original data set
% soln.grid.x = [nState, nData] = position at times grid.t
% soln.grid.v = [nState, nData] = velocity at times grid.t
% soln.grid.a = [nState, nData] = acceleration at times grid.t
%
% NOTES:
% x == position == value of the spline or data
% v == velocity == slope of the spline or data
% a == acceleration == curvature of the spline or data
%

引用

Matthew Kelly (2024). fitSplineToData (https://www.mathworks.com/matlabcentral/fileexchange/64119-fitsplinetodata), MATLAB Central File Exchange. 取得済み .

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

Community Treasure Hunt

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

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

Added photo

1.0.0.0