laleh_mokhtarpour
Newbie level 4
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
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