Home > functions > device > active_check > vb_plot_stat_hist.m

vb_plot_stat_hist

PURPOSE ^

SYNOPSIS ^

function [ylist,h,yy] = vb_plot_stat_hist(y,plist)

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    [ylist,h,yy] = vb_plot_stat_hist(y,plist)
0002 %
0003 % Copyright (C) 2011, ATR All Rights Reserved.
0004 % License : New BSD License(see VBMEG_LICENSE.txt)
0005 
0006 N = length(plist);
0007 [Nch, Ntry] = size(y);
0008 Nbin = 500;
0009 ymax = max(y(:));
0010 
0011 [h, yy] =hist(y(:),Nbin);
0012 
0013 [ylist, p] = vb_find_hist_threshold(h,yy,plist);
0014 
0015 ylist = [ylist, ymax];
0016 
0017 % sum( pd * dy) = 1
0018 dy = yy(2) - yy(1);
0019 pd = p / dy;
0020 
0021 plot(yy,pd);
0022 
0023 hold on
0024 type  = {'r--', 'b--', 'm--', 'c--'};
0025 
0026 for n=1:N-1
0027     plot([ylist(n) ylist(n)],[0 max(pd)], type{n})
0028 end
0029 
0030 xlim([0 ylist(N)])

Generated on Tue 27-Aug-2013 11:46:04 by m2html © 2005