[RX]
- added flip spectrum switch git-svn-id: http://moon:8086/svn/matlab/trunk@55 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
+9
-5
@@ -1,9 +1,9 @@
|
||||
function [sym_out, H, W] = ofdm_rx(filename, foff, SNR, with_cir, show_H)
|
||||
function [sym_out, H, W] = ofdm_rx(filename, foff, flip_spec, SNR, with_cir, show_H)
|
||||
%
|
||||
% [sym_out, H, W] = ofdm_rx(filename, foff, SNR, with_cir, show_H)
|
||||
% Example: ofdm_rx('drm-15435-if.wav', -174.65, 400, 0, 1)
|
||||
% Example: ofdm_rx('xv.wav', 0, 400, 0, 1)
|
||||
% or ofdm_rx('yv.wav', 0, 400, 0, 1)
|
||||
% [sym_out, H, W] = ofdm_rx(filename, foff, flip_spec, SNR, with_cir, show_H)
|
||||
% Example: ofdm_rx('drm-15435-if.wav', -174.65, 0, 400, 0, 1)
|
||||
% Example: ofdm_rx('xv.wav', 0, 0, 400, 0, 1)
|
||||
% or ofdm_rx('yv.wav', 0, 0, 400, 0, 1)
|
||||
|
||||
close all;
|
||||
|
||||
@@ -45,7 +45,11 @@ end
|
||||
if with_cir
|
||||
x = filter(h_cir, 1, x);
|
||||
end
|
||||
|
||||
x = x - mean(x);
|
||||
if flip_spec
|
||||
x = conj(x);
|
||||
end
|
||||
x = x./max(abs(x));
|
||||
xout = [real(x) imag(x)];
|
||||
wavwrite(xout,fs,nbits,'ofdm_rx.wav');
|
||||
|
||||
Reference in New Issue
Block a user