vector_transition.asv
来自「数字信号处理(机械工业出版社)的源码」· ASV 代码 · 共 25 行
ASV
25 行
% This demo describe the Vector Transition Processing.
figure
[b,a] = ellip(10,2,10,0.5)
stepI = ones(1,100); % abrupt step
yI = filter(b,a,stepI);
stepIS = [0.5*(1-cos(pi*(0:16)/16)) ones(1,83)]; % sine curve
yS = filter(b,a,stepIS); % smoothed
plot([yI; yS]');
xlabel('Time (sec)'),ylabel('Amplitude')
legend('Step Input','Smoothed Step');
pause
figure
derM = [0 diff(stepIS(1:18))]/0.0975;
winH = hann(length(derM));
plot([derM' winH]);
legend('Derivative of Smoothed Step','Hann Window');
pause
figure
windowF = cumsum(hann(17))';
stepIW = [ windowF/windowF(end) ones(1,100-length(windowF))];
yW = filter(b,a,stepIW);
plot([yI; yS; yW]');
xlabel('Time (sec)'),ylabel('Amplitude')
legend('Step Input','Smoothed Step', 'Window-based Step');
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?