Home > functions > device > active_check > vb_find_hist_threshold.m

vb_find_hist_threshold

PURPOSE ^

SYNOPSIS ^

function [ylist, p] = vb_find_hist_threshold(h,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, p] = vb_find_hist_threshold(h,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 p = h/sum(h);
0008 psum = cumsum(p);
0009 
0010 ylist = zeros(1,N);
0011 
0012 for n=1:N
0013     ix = find( psum >= (1 - plist(n)), 1);
0014     ylist(n) = y(ix);
0015 end

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