diff.m
来自「基于matlab的面向对象的信号处理类库。主要应用于音频、语音信号的一些处理。内」· M 代码 · 共 17 行
M
17 行
function y = diff(x,varargin)% $Id: diff.m 48 2004-09-16 12:07:24Z mairas $y = x;y.s = diff(x.s,varargin{:});n = length(x.s)-length(y.s);t = x.time;% should there be a half sample time shift in diff?% answer: no, think of the definition of differentiation% revised answer, with help of Tom: yes, there should, as it% makes more sense. :-)t = set(t,'begin', t.begin+(n/t.fs)/2, 'num', t.num-n);%t = set(t,'num', t.num-n);y=set(y,'time',t);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?