Convert time length to sample number --- Syntax numsamp = vb_time_to_numsamp(time,sample_freq) --- History 2008-10-30 Taku Yoshioka Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function numsamp = vb_time_to_numsamp(time,sample_freq) 0002 % Convert time length to sample number 0003 % 0004 % --- Syntax 0005 % numsamp = vb_time_to_numsamp(time,sample_freq) 0006 % 0007 % --- History 0008 % 2008-10-30 Taku Yoshioka 0009 % 0010 % Copyright (C) 2011, ATR All Rights Reserved. 0011 % License : New BSD License(see VBMEG_LICENSE.txt) 0012 0013 sampling_length = 1000/sample_freq; 0014 numsamp = ceil(time / sampling_length);