"Jan Simon" wrote in message <firstname.lastname@example.org>... > Dear Jessica, > > Yes, "newer" versions of Matlab interpret loops much faster using the JIT acceleration. Please note that this means "newer" than version 6.1 from June 2001. > > To check the difference type: > > feature('accel', 'off') > feature('jit', 'off') > > and run your program again. > > If you want to accelerate your code, post it here to get our ideas. > > Kind regards, Jan
Thanks for this information. My problem is in running this code:
%Delete saccades except when they mark the start/stop of image DataLength=size(Sdata);DataLength=DataLength(1); for i=0:DataLength-1 if strcmp(GazeType(DataLength-i,1),'Saccade')==1|strcmp(GazeType(DataLength- i,1),'Unclassified')==1; if strcmp(PictureStartColumn2(DataLength-i),'ImageStart')==0 if strcmp(PictureStartColumn2(DataLength-i),'ImageEnd')==0; Stextdata2(DataLength-i,:)=; Sdata(DataLength-i,:)=; end; end; end; end; end;
The loop often needs to run over 300,000 times (i.e., DataLength=300,000). After nearly 8 hours , I stopped the code to find that it was only up to 53,988.
I am basically trying to delete rows in a dataset that are marked as "Saccade" or "Unclassified" unless they are marked as "ImageStart" or "ImageEnd"