c9ex15.m

来自「连续与离散信号系统的Matlab仿真示例代码.」· M 代码 · 共 19 行

M
19
字号
f = [0 0.2 0.22 0.5 0.52 1];            % Specify f vectorm = [1 1 0.4 0.4 0 0];                  % Specify amplitude responsen = 30;                                 % Define nb = remez(n,f,m);                       % Compute impulse response[h,w] = freqz(b,1,512);                 % Compute frequency responseamp = abs(h);                           % Compute amplitude responsesubplot(2,1,1)                          % Designate first subplotplot(f/2,m,w/(2*pi),amp,'--')      % Plot amplitude responsexlabel('Normalized Frequency - r')      % Label x-axisylabel('Amplitude')                     % Label y-axisphase = angle(h);                       % Calculate phasephase = unwrap(phase);                  % Unwrap phasephasedeg = phase*180/pi;                % Express phase in degreessubplot(2,1,2)                          % Designate second subplotplot(w/(2*pi),phasedeg,'--')           % Plot phase responsexlabel('Normalized Frequency - r')      % Label x-axisylabel('Phase - degrees')               % Label y-axis

⌨️ 快捷键说明

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