matlab中pchip,MATLAB中chckxy函数

本文介绍了MATLAB中pchip插值算法所使用的内部函数chckxy的功能和作用。chckxy主要负责检查并调整输入数据,确保用于SPLINE和PCHIP的数据点数量匹配且X为单调递增向量。同时,它处理涉及NaN的数据点,重新排序数据站点和值,并在必要时考虑不完全约束的边界条件。文章提供了chckxy函数的源代码,并提醒读者可以通过在pchip函数内右键或使用Ctrl+D来查看此函数。
摘要由CSDN通过智能技术生成

鄙人在网上找了许久找不到pchip中关于chckxy函数的相关知识,在matlab命令窗口使用edit

chckxy也打不开该函数,后查资料发现这是一个private函数,也许跟这个有关系吧~现贴出该函数具体内容供参考:

function [x,y,sizey,endslopes] = chckxy(x,y)

%CHCKXY check and adjust input for SPLINE and PCHIP

% [X,Y,SIZEY] = CHCKXY(X,Y)

checks the data sites X and corresponding data

% values Y, making certain that

there are exactly as many sites as values,

% that no two data sites are

the same, removing any data points that involve

% NaNs, reordering the sites if

necessary to ensure that X is a strictly

% increasing row vector and

reordering the data values correspondingly,

% and reshaping Y if necessary

to make sure that it is a matrix, with Y(:,j)

% the data value corresponding

to the data site X(j), and with SIZEY the

% actual dimensions of the

g

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值