- removed decimation in m-script (which is done in CFIR)
git-svn-id: http://moon:8086/svn/vhdl/trunk@237 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
@@ -12,9 +12,6 @@ Q_out_dec = TEXTREAD('q_dec.txt')';
|
||||
I_out_fir = TEXTREAD('i_fir.txt')';
|
||||
Q_out_fir = TEXTREAD('q_fir.txt')';
|
||||
|
||||
I_out_fir = I_out_fir(1:2:length(I_out_fir));
|
||||
Q_out_fir = Q_out_fir(1:2:length(Q_out_fir));
|
||||
|
||||
N_dec = length(I_out_dec)-2*N_pfir;
|
||||
N_fft_dec = N_dec
|
||||
N_fft2_dec = N_fft_dec/2;
|
||||
@@ -31,10 +28,11 @@ f = (1:N_fft_dec)/N_fft_dec;
|
||||
g = (R*M)^N;
|
||||
H = abs(sin(pi*M.*f)./sin(pi.*f/R)).^N;
|
||||
|
||||
H = max(fft_y2_fir(1:2))*H ./ g;
|
||||
[v, j] = max(fft_y2_dec(1:N_fft2_dec/2))
|
||||
H = v*H/H(j);
|
||||
|
||||
wavwrite(0.9*[I_out_fir'-mean(I_out_fir) Q_out_fir'-mean(Q_out_fir)], 8000, 16, 'iq_cfir.wav');
|
||||
wavwrite(0.9*[I_out_dec'-mean(I_out_dec) Q_out_dec'-mean(Q_out_dec)], 8000, 16, 'iq.wav');
|
||||
wavwrite(0.5*[I_out_dec' Q_out_dec'], 16000, 16, 'iq.wav');
|
||||
wavwrite(0.5*[I_out_fir' Q_out_fir'], 8000, 16, 'iq_cfir.wav');
|
||||
|
||||
% Output
|
||||
close all;
|
||||
|
||||
Reference in New Issue
Block a user