p2_8.m

来自「《数字信号处理实验指导书(MATLAB 版)》 著者: (美)米特拉著 」· M 代码 · 共 19 行

M
19
字号
% Program P2_8% Stability test based on the sum of the absolute % values of the impulse response samplesclf;num = [1 -0.8]; den = [1 1.5  0.9];N = 200;h = impz(num,den,N+1);parsum = 0;for k = 1:N+1;	parsum = parsum + abs(h(k));	if abs(h(k)) < 10^(-6), break, endend% Plot the impulse responsen = 0:N;stem(n,h)xlabel('Time index n'); ylabel('Amplitude');% Print the value of abs(h(k)) disp('Value =');disp(abs(h(k)));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?