matlab 中的 nargin find diff shiftdim

nargin  代表离nargin最近一个函数输入的参数个数 或者 nargin所在函数的输入个数

diff  计算相邻数据之间的差值

find  寻找不为0的点

B = shiftdim(A,n) 将数组 A 的维度移动 n 个位置。当 n 为正整数时,shiftdim 向左移动维度;当 n 为负整数时,向右移动维度。例如,如果 A 是 2×3×4 数组,则 shiftdim(A,2) 返回 4×2×3 数组。

B =  (A) 返回数组,其元素与 A 相同,但删除了前面的长度为 1 的维度。

示例

[B,m] = shiftdim(A) 还返回删除的长度为 1 的维度的数量。

发布了234 篇原创文章 · 获赞 61 · 访问量 12万+

猜你喜欢

转载自blog.csdn.net/weixin_42528089/article/details/104691572