diff --git a/ofdm/ofdm_rx.m b/ofdm/ofdm_rx.m index bd77fb2..e1b7af3 100644 --- a/ofdm/ofdm_rx.m +++ b/ofdm/ofdm_rx.m @@ -1,9 +1,8 @@ function [sym_out, H, W] = ofdm_rx(filename, foff, SNR, with_cir) % -% Example: ofdm_rx('drm-15435-if.wav', -174.65, -400, 0) -% Example: ofdm_tx(40, 1) -% ofdm_rx('xv.wav', 0, -400, 0) -% or ofdm_rx('yv.wav', 0, -400, 0) +% Example: ofdm_rx('drm-15435-if.wav', -174.65, 400, 0) +% Example: ofdm_rx('xv.wav', 0, 400, 0) +% or ofdm_rx('yv.wav', 0, 400, 0) close all; @@ -268,10 +267,20 @@ for k=start:length(Z_) sym_out(:, kk) = sym_eq; if 1 H_raw(1:2:N) = H_raw(2:2:N); - subplot(2, 1, 1) + subplot(3, 1, 1) plot(carriers, abs(H_raw(carrier_indexes)), 'b-', carriers, abs(H), 'r-'); grid; title('abs(H)'); axis([ofdm_spec_occ.kmin ofdm_spec_occ.kmax 0 15+0*max(abs(H))]); title(str); - subplot(2, 1, 2) + subplot(3, 1, 2) plot(carriers, angle(H_raw(carrier_indexes)), 'b-', carriers, angle(H), 'r-'); grid; title('phi(H)'); axis([ofdm_spec_occ.kmin ofdm_spec_occ.kmax -4 4]); title(str); + subplot(3, 1, 3) + plot(carriers, abs(sym_eq), 'b-'); grid; title('abs(Sym_{Eq})'); axis([ofdm_spec_occ.kmin ofdm_spec_occ.kmax 0 2]); title(str); + hold on; + for b=c2i(N, carrier_pilot) + x = [b b]; + y = [0 2]; + plot(x-1,y, 'r-'); + end + hold off; + pause(0.01); else fac_c = fac_cell_list{symbol_counter+1}; diff --git a/ofdm/ofdm_tx.m b/ofdm/ofdm_tx.m index c1b7125..175b026 100644 --- a/ofdm/ofdm_tx.m +++ b/ofdm/ofdm_tx.m @@ -1,5 +1,8 @@ -% function ofdm_tx(N_frames) function [yv xv] = ofdm_tx(mode, bandwidth, N_frames, withData, plot_speed) +% +% function [yv xv] = ofdm_tx(mode, bandwidth, N_frames, withData, plot_speed) +% Example : ofdm_tx('B', '10k', 500, 1, 0); +% close all;