From 982bf2c32f825df25dc41a0260c1e2d46ada1342 Mon Sep 17 00:00:00 2001 From: Jens Ahrensfeld Date: Sun, 3 May 2015 15:42:21 +0000 Subject: [PATCH] - fixed H-Plot axis git-svn-id: http://moon:8086/svn/matlab/trunk@72 801c6759-fa7c-4059-a304-17956f83a07c --- ofdm/ofdm_rx.m | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ofdm/ofdm_rx.m b/ofdm/ofdm_rx.m index f3e1024..b39cff9 100644 --- a/ofdm/ofdm_rx.m +++ b/ofdm/ofdm_rx.m @@ -94,6 +94,7 @@ fileCunkCounter = 0; phi_xwav = 0; df_track = 0; df_track_ = []; +max_H_plot = 0; symbol_count = -1; fileRemain = wav_size; @@ -332,9 +333,9 @@ while(fileRemain > fileChunkSize) end end - % check for too small values + % check for too small H rms_H = sqrt( abs( H_syms*H_syms' )/length(H_syms) ); - equalizer.eps_abs_h = max( rms_H/20, MIN_ABS_H ); %quick and dirty fixed settings + equalizer.eps_abs_h = max( rms_H/20, MIN_ABS_H ); H_too_small_index = find( abs(H_syms) fileChunkSize) end if 1 if show_H + max_H_plot = ceil(max(max_H_plot, max(abs(H_raw(2:2:N))))); H_raw(1:2:N) = H_raw(2:2:N); subplot(3, 1, 1) - plot(carriers, abs(H_raw(carrier_indexes)), 'b-', carriers, abs(H_syms), 'r-'); grid; title('abs(H_{syms})'); axis([ofdm_spec_occ.kmin ofdm_spec_occ.kmax 0 15+0*max(abs(H_syms))]); title(str); + plot(carriers, abs(H_raw(carrier_indexes)), 'b-', carriers, abs(H_syms), 'r-'); grid; title('abs(H_{syms})'); axis([ofdm_spec_occ.kmin ofdm_spec_occ.kmax 0 max_H_plot]); title(str); subplot(3, 1, 2) plot(carriers, angle(H_raw(carrier_indexes)), 'b-', carriers, angle(H_syms), 'r-'); grid; title('phi(H_{syms})'); axis([ofdm_spec_occ.kmin ofdm_spec_occ.kmax -4 4]); title(str); subplot(3, 1, 3)