spike sorting and clustering using PCA

조회 수: 5 (최근 30일)
Enock Boakye
Enock Boakye 2019년 2월 22일
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