hermite3seg

Version 1.0.1 (1.75 KB) by M.Sy
Piecewise two-point cubic hermite interpolation, uses data and data's derivative with independent variable to get result.
12 Downloads
Updated 9 Oct 2020

View License

Piecewise two-point cubic hermite interpolation, return the interpolation result and interpolation index. The input and output data structure is the same as MATLAB function vq = interp1(x,v,xq),and call-for rules are similar.
分段两点三次hermite插值,返回插值结果与插值index. 函数的数据结构与MATLAB插值函数interp1完全一样,调用规则对应。

[ rMat , ptr2 ] = hermite3seg ( tVec , xMat , xpMat , t , ptr )
returns interpolated values of a 1-D function x(t), at specific query points using piecewise cubic hermite interpolation.
INPUTS:
Vector tVec contains the sample points, it the independend variable;
xMat: contains the corresponding values in matrix form, xMat(tVec), it's the dependent variable; xpMat: contains the time derivative values of dependent variable x in matrix form, xMat'(tVec).
Vector t: contains the coordinates of the query points.
Another optional variable ptr is the beginning search index on tVec.
OUTPUTS:
rMat:a matrix containing variable x as a function of t
Output also ending search index on tVec, so as to run faster for use next time.

Cite As

M.Sy (2024). hermite3seg (https://www.mathworks.com/matlabcentral/fileexchange/80891-hermite3seg), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.1

Calculation of ptr when no ptr input is debugged.

1.0.0