Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function yth = vb_get_peak_threshold(y,y0) 0002 % 0003 % Copyright (C) 2011, ATR All Rights Reserved. 0004 % License : New BSD License(see VBMEG_LICENSE.txt) 0005 0006 jx = find( y > y0 ); 0007 kx = find( y(2:end-1) > y0 ... 0008 & y(2:end-1) >= y(1:end-2) ... 0009 & y(2:end-1) >= y(3:end)); 0010 0011 yth = [mean(y(jx)), mean(y(kx))];