📄 freqplot.m
字号:
% FREQPLOT(B,A,color)
%
% This function is used to plot the amplitude
% response of filter or signal. A logarithmic
% (base 10) scale is used for the Y-axis.
% X-axis is normalized freqency from 0 to 0.5.
% The color will be the one specified in
% argument. If there is no color specification,
% the color will be white.
% See also DPLOT, FREQPW
%
function freqplot(B,A,c)
if nargin == 2
c = 'k';
end
x1= 0.5;
[F,W]=freqz(B,A,2048);
W=linspace(0,x1,2048);
F = abs(F);
%F = dbvalue(F);
%F = dbvalue(F./F(1));
% F = dbvalue(F./F(2048));
F = dbvalue(F./max(F));
plot(W,F,c);
v = axis;
axis([0,x1,v(3),10]);
xlabel('Normalized Frequency');
ylabel('Log Magnitude (dB)');
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -