tomwalters@0: % method of class @frame 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 @frame 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: % tomwalters@0: % (c) 2003, University of Cambridge, Medical Research Council tomwalters@0: % Stefan Bleeck (stefan@bleeck.de) tomwalters@0: % http://www.mrc-cbu.cam.ac.uk/cnbh/aimmanual tomwalters@0: % $Date: 2003/06/11 10:46:32 $ tomwalters@0: % $Revision: 1.1 $ tomwalters@0: tomwalters@0: function res=bin2time(fr,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=fr.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+fr.start_time;