keep);
0048 <span class="keyword">end</span>
0049 <span class="keyword">if</span> ~isempty (threshold)
0050     ii=find(evs/evs(1)&gt;threshold);
0051     topcs=topcs(:,ii);
0052     evs=evs(ii);
0053 <span class="keyword">end</span>
0054 
0055 <span class="comment">%clf; plot(evs); set(gca,'yscale','log'); pause</span>
0056 
0057 <span class="comment">% apply PCA matrix to time-shifted data</span>
0058 z=zeros(numel(idx),size(topcs,2),o);
0059 <span class="keyword">for</span> k=1:o
0060     z(:,:,k)=<a hre