tomwalters@0: % method of class @signal tomwalters@0: % function res=bin2time(sig,bin) tomwalters@0: % calculates the time according to the value of the bin in tomwalters@0: % tomwalters@0: % INPUT VALUES: tomwalters@0: % sig: original @signal tomwalters@0: % bin: value of bin (not necessary integer) tomwalters@0: % tomwalters@0: % RETURN VALUE: tomwalters@0: % res: time of bin in seconds 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 bleeck@3: tomwalters@0: tomwalters@0: function res=bin2time(sig,val) tomwalters@0: % gibt die Zeit zurück, bei dem dieses Bin ist tomwalters@0: % Zeit immer in Sekunden tomwalters@0: % Samplerate immer in Bins pro Sekunde (96 kHz) tomwalters@0: sr=sig.samplerate; tomwalters@0: % eines abgezogen, weil Matlab bei 1 startet also bin 1der Anfangszeitpunkt ist tomwalters@0: % res=(val-1)/sr; tomwalters@0: res=val/sr; tomwalters@0: tomwalters@0: res=res+sig.start_time;