polyphase filter matlab,(To be removed) Multirate filter

mfilt

(To be removed) Multirate filter

Syntax

hm = mfilt.structure(input1,input2,...)

Description

hm = mfilt.structure(input1,input2,...)

returns the object hm of type structure.

As with dfilt objects, you must include the

structure to construct a multirate filter object. You

can, however, construct a default multirate filter object of a given structure by not

including input arguments in your calling syntax.

Multirate filters include decimators and interpolators, and

fractional decimators and fractional interpolators where the resulting

interpolation or decimation factor is not an integer.

Structures

Each of the following multirate filter structures has a reference

page of its own.

Filter StructureDescription

of Resulting Multirate FilterCoefficient Mapping Support in realizemdlCascade multirate filters to form another filterSupported

Cascaded integrator-comb decimatorNot supported

Cascaded integrator-comb interpolatorNot supported

Multirate Farrow filterSupported.

Overlap-add FIR polyphase interpolatorNot supported

Direct-form FIR polyphase decimatorSupported

Direct-form FIR polyphase interpolatorSupported

Direct-form FIR polyphase sample rate converterSupported

Direct-form transposed FIR polyphase decimatorSupported

FIR hold interpolatorNot supported

IIR decimatorSupported

IIR interpolatorSupported

FIR Linear interpolatorSupported

IIR wave digital filter decimatorSupported

IIR wave digital filter interpolatorSupported

Copying mfilt Objects

To create a copy of an mfilt object, use

the copy method.

h2 = copy(hd)

Note

The syntax hd2 = hd copies only the object

handle. It does not create a new object. hd2 and hd are

not independent. If you change the property value for one of the two,

such as hd2, you are changing the property for

both.

Examples

Decimation by a factor of two. Convert input sampled at 48 kHz

to 24 kHz:

Fs = 4.8e4;

t =0:1/Fs:1-(1/Fs);

x = cos(2*pi*4000*t);

Hm=mfilt.firdecim(2);

% Note cutoff frequency of 1/2 normalized frequency

fvtool(Hm);

% Note the group delay of 34 samples

fvtool(Hm,'analysis','grpdelay');

y = filter(Hm,x);

% Note delay in output is consistent with 36/2

stem(y(1:48),'markerfacecolor',[0 0 1]);

Using existing coefficients to decimate a signal by a factor

of two:

M = 2; % Decimation factor

b = firhalfband('minorder',.45,0.0001);

Hm = mfilt.firdecim(M,b);

% Decimate a signal which consists of the sum of 2 sinusoids.

N = 160;

x = sin(2*pi*.05*[0:N-1]+pi/3)+cos(2*pi*.03*[0:N-1]+pi/3);

y = filter(Hm,x);

Note

Multirate filters can also have complex coefficients. For example,

you can specify complex coefficients in the argument num passed

to the filter structure. This works for all multirate filter structures.

m = 2;

num = [0.5 0.5+1j*0.2];

Hm = mfilt.firdecim(m, num);

y = filter(Hm, [1:10]);

Introduced in R2011a

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值