⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 freqplot.m

📁 里面囊括了基于matlab滤波器设计的各种.m文件
💻 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 + -