spike sorting and clustering using PCA

10 次查看(过去 30 天)
I am attempting to sort neural spikes but my code is giving me just an empty figure without the spikes
below is a copy of my code.
variance = rms(wave);
amplitude = (max(wave)-min(wave))/2;
SNR=snr(wave);
threshold = 4*variance;
[value, index]= findpeaks(wave, time, 'Threshold', threshold);
noise = 20 *randn(size(wave));
[~, loc] = ismember(index , time)
actionP= zeros(1, 180000);
potentialperiods = zeros(1, 180000);
for k = 1:numel(index)
actionP(k,:) = wave(loc(k)-20: loc(k)+40);
potentialperiods(k) = time(loc(k)-20: loc(k)+40);
end
figure(1);
hold on;
plot (potentialperiods, actionP);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Single-Rate Filters 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by