dfig08draw.m

来自「beamlet变化的工具箱」· M 代码 · 共 80 行

M
80
字号
% fig08draw - draw the figure for the max beamlet coefficient detection 
%   The figure includes: 
%      - (1) elevation       mu
%      - (2) GLRT score      mu*sqrt(|e|)
%      - (3) Detectability   2sqrt(2 log(n))
%      - (4) max pixel
%      - (5) max beamlet

load fig08_128_100  
%clf; 
sp = 1; ep = length(snr_str);

n  = 128; v0 = [1/n,1/8]*n; v1 = [7/8,1]*n;
[PathNNG,MinCostNNG] = FindPathInNNG(v0,v1,n); nPathNNG = size(PathNNG,1);

pixel_max_str_median      = median(pixel_max_str);
beamlet_score_str_median  = median(beamlet_score_str);
wavelet_score_mtrx_median = median(wavelet_score_mtrx,1);

%(1)
semilogy(snr_str(sp:ep),sig_ampl_str(sp:ep),'md'); hold on; 
semilogy(snr_str(sp:ep),sig_ampl_str(sp:ep),'m' );
fprintf(' o Diamond indicates signal amplitude.\n');

%(2)
semilogy(snr_str(sp:ep),sqrt(nPathNNG).*sig_ampl_str(sp:ep),'r' );
semilogy(snr_str(sp:ep),sqrt(nPathNNG).*sig_ampl_str(sp:ep),'rx');
fprintf(' o Cross indicates GLRT score.\n');

%(3)
semilogy(snr_str(sp:ep),2*sqrt(2*log(n))*ones(size(snr_str(sp:ep))),'k*');
semilogy(snr_str(sp:ep),2*sqrt(2*log(n))*ones(size(snr_str(sp:ep))),'k' );
fprintf(' o Star indicates 2sqrt(2log(n)).\n');

%(4)
semilogy(snr_str(sp:ep),pixel_max_str_median(sp:ep),'b+'); 
semilogy(snr_str(sp:ep),pixel_max_str_median(sp:ep),'bo'); 
semilogy(snr_str(sp:ep),pixel_max_str_median(sp:ep),'b' );
fprintf(' o Plus+circle indicates maximum pixel amplitude.\n');

%(5)
semilogy(snr_str(sp:ep),beamlet_score_str_median(sp:ep),'gs');
semilogy(snr_str(sp:ep),beamlet_score_str_median(sp:ep),'g' );
fprintf(' o Square indicates beamlets score.\n');

xlabel('SNR'); ylabel('log_{10}(Score)');
axis([-33 5 .2 sqrt(nPathNNG)*max(sig_ampl_str)*1.5]);
if 0,
	% Add labels? 
	%k = input('Add labels (0-no/1-yes)?');
	if k == 1,
      fprintf('signal elevation\n'); 
      h = gtext('Signal Elevation');            set(h,'Color', [1 0 1]);
      fprintf('maximum pixel value\n'); 
      h = gtext('Maximum Pixel Value');         set(h,'Color', [0 0 1]);
      fprintf('threshold\n'); 
      h = gtext('Threshold');                   set(h,'Color', [0 0 0]);
      fprintf('maximum beamlet coefficient\n'); 
      h = gtext('Maximum Beamlet Coefficient'); set(h,'Color', [0 1 0]);
      fprintf('the GLRT score\n'); 
      h = gtext('GLRT Score');                  set(h,'Color', [1 0 0]);
	end;
end

%% Part of BeamLab Version:200% Built:Friday,23-Aug-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%%% Part of BeamLab Version:200% Built:Saturday,14-Sep-2002 00:00:00% This is Copyrighted Material% For Copying permissions see COPYING.m% Comments? e-mail beamlab@stat.stanford.edu%

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?