killUnwantedChannels function results in 'Matrix index is out of range for deletion.' when not reading waveforms
stinos opened this issue · 1 comments
stinos commented
Practically the 'c:<channels>'
argument doesn't work in combination with 'noread'
because of the unconditional
NEV.Data.Spikes.Waveform(:, NEV.Data.Spikes.Electrode == unWantedChannels(idx)) = [];
line. Suggestion: wrap that one in if ~isempty(NEV.Data.Spikes.Waveform)
.
stinos commented
There's a similar issue in openNSx
: line 955 should be
elseif ~isempty(NSx.Data)
instead of just else
to avoid errors from calls on empty Data
.