rd">elseif</span> (spikes.threshT &gt; size(spikes.waveforms, 2))
0054     error(<span class="string">'SS:threshT_invalid'</span>, <span class="string">'The threshold time ThreshT does not fall within the supplied data waveform.'</span>);
0055 <span class="keyword">elseif</span> (~isfield(spikes, <span class="string">'threshV'</span>) || (length(spikes.threshV) ~= 2))
0056     error(<span class="string">'SS:threshV_invalid'</span>, <span class="string">'The SS object must define both low and high thresholds