Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Obtaining filter coefficients in Matlab for a elliptic 5th order

Status
Not open for further replies.

hueyling_yeoh

New Member
hi

I'm designing a harmonic filter section for a portable radio.

The filter topology of this filter is the 5th order Elliptic. I plan to obtain the filter coefficients of of the design using Matlab and was wondering whether upon construction of the filter in sptool, that the attached m-file code excerpt would be able to correctly return the filter coefficients. If the attached m-file is unable to do so, are there any other methods that I can be able to do so?

Thanks for hearing me out.

Code:
function [num,den]=pfilt(name)
% Returns Numerator and Denomenator Values from
% SPTool	SD 3/3/98 
if nargin==0,name='filt1';end
f = sptool('Filters');
labels=char(f.label);
fn=strmatch(name,labels);
if(isempty(fn)),error('NO FILTER OF THAT NAME'),end
if(any(size(fn)>1)),error('AMBUIGUOUS FILTER  NAME'),end
num=f(fn).tf.num;
den=f(fn).tf.den;
disp('Numerator');
disp(num');
disp('Denominator');
disp(den');

Peace.
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top