- fixed H-Plot axis

git-svn-id: http://moon:8086/svn/matlab/trunk@72 801c6759-fa7c-4059-a304-17956f83a07c
This commit is contained in:
2015-05-03 15:42:21 +00:00
parent 05eb9f883e
commit 982bf2c32f
+5 -3
View File
@@ -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)<equalizer.eps_abs_h );
H_syms( H_too_small_index ) = equalizer.eps_abs_h;
@@ -350,9 +351,10 @@ while(fileRemain > 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)