polysplinefit - Polynomial Spline Interpolation

This function fits a polynomial splines of order m to a given data (x,y). it is valid for one dimension only.
202.0 次下载
更新时间 2018/12/15

查看许可证

% This function fits a polynomial splines of order m to a given data (x,y).
% it is valid for one dimension only.
% the function uses interpolation approach so it is not suitable for
% noisy data
% ----------------------------------------------
% inputs
% x x data must be increasing. ex x = [1,2,3]
% y f(x)
% m polynomial order for each spline
% cond the addition conditions needed to compute the splines
% it's given by spline initial derivative values
% for the first and last spline only.
% cond rows number = spline order - 1.
%
% cond form is [spline,derivative_order,value_of_the_derivative]
% spline : 1 for the first spline
% 2 for the last splines
% ex:
% cond = [1 1 0;2 1 0]
% this means that the value of the first derivative of the first spline
% is zero and the value of the first derivative of the last spline is zero
%
% ---------------------------------------------------------------------
% output
% sol spline between each x
% ---------------------------------------------------------------------
% example
% x = [0 2 4 6 8];
% y = [0 2.2484 2.3164 2.5413 2.8626];
% m = 2;
% cond = [1 1 0;2 1 0;1 2 0;2 2 0];
% sol = polysplinefit(x,y,m,cond)
%
% All copyrights goes to Mohammad Al-Fetyani
% University of Jordan

引用格式

Mohammad Al-Fetyani (2024). polysplinefit - Polynomial Spline Interpolation (https://www.mathworks.com/matlabcentral/fileexchange/69693-polysplinefit-polynomial-spline-interpolation), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2018b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Splines 的更多信息
标签 添加标签

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.2

Title Updated

1.0.1

Fixing a bug where the function does not work when input (x) starts from zero.

1.0.0