annotate aim-mat/tools/@frame/plotwithstrobes.m @ 4:537f939baef0 tip

various bug fixes and changed copyright message
author Stefan Bleeck <bleeck@gmail.com>
date Tue, 16 Aug 2011 14:37:17 +0100
parents 74dedb26614d
children
rev   line source
tomwalters@0 1 % method of class @frame
tomwalters@0 2 %
tomwalters@0 3 % INPUT VALUES:
tomwalters@0 4 %
tomwalters@0 5 % RETURN VALUE:
tomwalters@0 6 %
tomwalters@0 7 %
tomwalters@0 8 % (c) 2003, University of Cambridge, Medical Research Council
tomwalters@0 9 % Stefan Bleeck (stefan@bleeck.de)
tomwalters@0 10 % http://www.mrc-cbu.cam.ac.uk/cnbh/aimmanual
tomwalters@0 11 % $Date: 2003/01/17 16:57:46 $
tomwalters@0 12 % $Revision: 1.3 $
tomwalters@0 13
tomwalters@0 14 function plotwithstrobes(nap,allstrobeprocesses)
tomwalters@0 15
tomwalters@0 16 plot(nap);
tomwalters@0 17 sr=getsr(nap);hold on
tomwalters@0 18 nr_channels=getnrchannels(nap);
tomwalters@0 19 start_time=getminimumtime(nap);
tomwalters@0 20 for i=1:nr_channels
tomwalters@0 21 nr_strobes=length(allstrobeprocesses{i}.strobes);
tomwalters@0 22 for j=1:nr_strobes
tomwalters@0 23 x=time2bin(allstrobeprocesses{i}.strobes(j)-start_time,sr);
tomwalters@0 24 y=i;
tomwalters@0 25 z=allstrobeprocesses{i}.strobe_vals(j);
tomwalters@0 26 plot3(x,y,z,'.r');hold on
tomwalters@0 27 end
tomwalters@0 28
tomwalters@0 29 end