filtering - MATLAB multidimensional Filter Array -



filtering - MATLAB multidimensional Filter Array -

i designed iir filter fdatool in matlab , exported coefficients header file. copied arrays on matlab , trying plot frequency response. reason arrays multidimensional , i'm not sure how create matlab handle that.

this filter coefficients like:

num = [ [0.7167852126947,0,0], [1,-1.919646855375,1], [0.4393545211166,0,0], [1,-1.603319802493,1], [0.03175470360035,0,0], [1,-1.942960840584,1], [1,0,0] ]; den = [ [1,0,0], [1,-1.904445073337,0.9382561062801], [1,0,0], [1,-1.837789625289,0.8507293334097], [1,0,0], [1,-1.942552416592,0.9865719866549], [1,0,0] ];

if single dimensional pass them freqz function in matlab so:

freqz(num,den);

but gives me error above arrays.

what's best way plot frequency response of filter?

from format of num , den have next presumption:

matlab's fdatool default creates second-order-sections iir filters , returns matrix of second-order-sections (they phone call sos matrix). sos form looks this:

while sos matrix returned matlab has next format:

now, num looks part of matrix containing b's, while den contains ones (which a_0's) , a's.

most matlab functions (includeing freqz function) can handle sos-matrices, advisable create sos matrix , phone call function by:

sos = [num,den]; freqz(sos);

it appears not supported in older versions of matlab. in case you'll have convert tf (transfer function) format first:

[b,a] = sos2tf(sos); freqz(b,a);

matlab filtering

Comments

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -