MATLAB中freqz函数的用法

 
本文引用自乱七八糟 《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点,且单位为弧度)

其中,滤波器形式如下:

 MATLAB中freqz函数的用法 - 乱七八糟 - radar_23 的博客

 

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。

 MATLAB中freqz函数的用法 - 乱七八糟 - radar_23 的博客

     [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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值