引用MATLAB中freqz函数的用法
2011-03-25 16:31
本文引用自乱七八糟《MATLAB中freqz函数的用法》FREQZ 是计算数字滤波器的频率响应的函数
[H,W] = FREQZ(B,A,N)returns the N-point complex frequency response
vector H and the N-point frequency vector W in radians/sample of
the filter:
函数的输出:a.滤波器的频率响应H(N点) b.频率向量W(N点,且单位为弧度)frequency函数计算频数
其中,滤波器形式如下:
given numerator and denominator coefficients in vectors B and A. The
frequency response is evaluated at N points equally spaced around the
upper half of the unit circle. If N isn't specified, it defaults to 512.
滤波器的系数:
分子为B,分母为 A
频率向量W,是均匀分布在滤波器的上半区,即:0:pi,这些点上的频率响应都将通过此函数计算出来。
举例:
假设滤波器的系数A=1,B=【1 1/2 1/3 1/4】;通过FREQZ 函数便可以得到此滤波器的频率特性
其中,需要考察的是H和W的长度,看是否符合我们设置的N。
[H,W] = FREQZ(B,A,N,'whole')uses N points around the whole unit circle. 函数给出了滤波器的双边频率特性,是N点的
H = FREQZ(B,A,W)returns the frequency response at frequencies
designated in vector W, in radians/sample (normally between 0 and pi).
函数的输出依然是滤波器的频率响应H,只不过这个H是限定了范围的,不再是全频率(0:pi)上的了,这个范围由W来指定,单位是弧度。
举例:W=【0.5pi----pi】,下图中,红线部分便是此函数的输出,可见,只描述了【0.5pi----pi】之间的频率响应。
[H,F] = FREQZ(B,A,N,Fs) and [H,F] = FREQZ(B,A,N,'whole',Fs)return
frequency vector F (in Hz), where Fs is the sampling frequency (in Hz).
注意下图的横坐标与程序中fs的关系
H = FREQZ(B,A,F,Fs)returns the complex frequency response at the
frequencies designated in vector F (in Hz), where
Fs is the sampling
frequency (in Hz).
FREQZ(B,A,...)with no output arguments plots the magnitude and
unwrapped phase of the filter in the current figure window.
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论