Код
function [yi, ypi, yppi] = chermite(x, y, yp, xi, c)
% CHERMITE 1-D piecewise cubic Hermite spline
% CHERMITE(X,Y,YP,XI,C) interpolates to find YI, the values of the
% underlying function Y at the points in the array XI, using
% piecewise cubic Hermite splines. X and Y must be vectors
% of length N.
%
% C specifies how tangents are calculated when YP is not specified.
% C can be:
% 0 : Finite difference (default)
% 1 : Catmull-Rom spline
% 2 : Monotone interpolation
% 3 : Monotone with Lam harmonic mean
%
% [YI,YPI,YPPI] = CHERMITE() also returns the interpolated
% quadratic derivative and linear second derivative of the
% underlying function Y at points XI.
% Joe Henning - Fall 2011
% CHERMITE 1-D piecewise cubic Hermite spline
% CHERMITE(X,Y,YP,XI,C) interpolates to find YI, the values of the
% underlying function Y at the points in the array XI, using
% piecewise cubic Hermite splines. X and Y must be vectors
% of length N.
%
% C specifies how tangents are calculated when YP is not specified.
% C can be:
% 0 : Finite difference (default)
% 1 : Catmull-Rom spline
% 2 : Monotone interpolation
% 3 : Monotone with Lam harmonic mean
%
% [YI,YPI,YPPI] = CHERMITE() also returns the interpolated
% quadratic derivative and linear second derivative of the
% underlying function Y at points XI.
% Joe Henning - Fall 2011
Как вызвать функцию, не указывая входную производную YP?
Если задаю, например, числа или сами Y, то интерполяция уже не зависит от C.
Наверное, способ простой, но я его не знаю.