Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Check my code for converting coefficients to FIR filter

Status
Not open for further replies.

laleh_mokhtarpour

Newbie level 4
Joined
Feb 10, 2010
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
canada
Activity points
1,323
Hi

I have the transfer function coefficient of a path (num and den).
I should convert this coefiicients to FIR filter with length of 48, so I used the matlab codes for fir2. can enybody check my codes ?

b=textread('C:\ANC\CPROGS\SRC\p_z.asc','%f');
a=textread('C:\ANC\CPROGS\SRC\p_p.asc','%f');
freqz(b,a,1024,2000)
f=0:1/1023:1;
m=abs(freqz(b,a,1024,2000));
m=m';
z=fir2(48,f,m);

How can I make sure that if my methods act correctly?

Many Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top