Home > vbmeg > functions > device > trigger_timing > vb_show_hist_threshold.m

vb_show_hist_threshold

PURPOSE ^

SYNOPSIS ^

function vb_show_hist_threshold(level, A ,hy ,y)

DESCRIPTION ^

 Copyright (C) 2011, ATR All Rights Reserved.
 License : New BSD License(see VBMEG_LICENSE.txt)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function    vb_show_hist_threshold(level, A ,hy ,y)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 hg = exp(A(1)*y + A(2)*log(y) + A(3));
0007 hg = hg * max(hy)/max(hg);
0008 
0009 y   = y/max(y);
0010 yth = level/max(y);
0011 
0012 %%%% Plot figure
0013 figure;
0014 
0015 subplot    211
0016 plot(y,hy)
0017 hold on
0018 plot(y,hg,'r--')
0019 ylabel('Histgram')
0020 title('Signal Histgram/Estimated Gamma distribution')
0021 
0022 subplot    212
0023 plot(y,hy)
0024 hold on
0025 plot(y,hg,'r--')
0026 
0027 plot([yth yth], [0 max(hy)*0.5],'r-')
0028 
0029 xlim([0 yth*1.5])
0030 
0031 title('Signal Histgram/Estimated Gamma distribution')
0032 xlabel('Normalized Amplitude')
0033 ylabel('Histgram')

Generated on Mon 22-May-2023 06:53:56 by m2html © 2005