tomwalters@0: % method of class @ tomwalters@0: %function bin=time2bin(sig,time) tomwalters@0: % INPUT VALUES: tomwalters@0: % sig: @signal tomwalters@0: % time: time in seconds tomwalters@0: % RETURN VALUE: tomwalters@0: % bin: interpolated bin value of that time in the signal corrected by tomwalters@0: % the signals start time tomwalters@0: % bleeck@3: % This external file is included as part of the 'aim-mat' distribution package bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org tomwalters@0: tomwalters@0: function ret=time2bin(sig,time) tomwalters@0: % returns the real value of the times in bins in the signal. This must not tomwalters@0: % be the value that is needed to plot! (see time2plotbin) tomwalters@0: tomwalters@0: tomwalters@0: tomwalters@0: time=time-sig.start_time; tomwalters@0: tomwalters@0: ret=time*sig.samplerate; tomwalters@0: ret=round(ret);