spike sorting and clustering using PCA
4 ビュー (過去 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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Single-Rate Filters についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!