CAD/CAM技术及应用
method = 'linear';
else
method = varargin{3};
end
else
if nargin >= 3+xOffset && ~isempty(varargin{3+xOffset})
method = varargin{3+xOffset};
else
method = 'linear';
end
end
% The v5 option, '*method', asserts that x is equally spaced.
eqsp = (method(1) == '*');
if eqsp
method(1) = [];
end
% INTERP1([X,]Y,XI,METHOD,'extrap') and INTERP1([X,]Y,Xi,METHOD,EXTRAPVAL) if ~ppOutput
if nargin >= 4+xOffset
extrapval = varargin{4+xOffset};
else
switch method(1)
case {'s','p','c'}
extrapval = 'extrap';
otherwise
extrapval = NaN;
end
end
end
% Start the algorithm
% We now have column vector xCol, column vector or 2D matrix yMat and
% column vector xiCol.
if xOffset
if ~eqsp
h = diff(xCol);
eqsp = (norm(diff(h),Inf) <= eps(norm(xCol,Inf)));
if any(~isfinite(xCol))
eqsp = 0; % if an INF in x, x is not equally spaced
end
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库CAD/CAM技术及应用(7)在线全文阅读。
相关推荐: