mory use down</span>
0064 numspikes = size(spikes.waveforms, 1);
0065 numsamples = size(spikes.waveforms, 2);
0066 
0067 <span class="comment">%%%%%%%%%% FIND FIDUCIALS</span>
0068 <span class="comment">% first, get a mask over the peaks</span>
0069 isThreshLo = (spikes.waveforms(:, spikes.threshT) &lt; spikes.threshV(1));
0070 [h, w, pl, mask] = thresholded_peaks(spikes);
0071 
0072 <span class="comment">% next, subtract appropriate thresholds, making all values in the peak</span>
0073 <span class="comment