Home > functions > common > utility > vb_time_to_numsamp.m

vb_time_to_numsamp

PURPOSE ^

Convert time length to sample number

SYNOPSIS ^

function numsamp = vb_time_to_numsamp(time,sample_freq)

DESCRIPTION ^

 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)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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

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