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

vb_get_peak_threshold

PURPOSE ^

SYNOPSIS ^

function yth = vb_get_peak_threshold(y,y0)

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    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))];

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