Code covered by the BSD License  

Highlights from
MatClust

image thumbnail

MatClust

by

 

28 Dec 2012 (Updated )

Spike sorting program for extracellular recordings. Version 1.4

NonComplexSpikes()
function out = NonComplexSpikes()

global clustdata;
global clustattrib;

clustnum = inputdlg('Which cluster?','Filter non-complex spikes');
clustnum = str2num(clustnum{1});
historywindow = 1000; 
if ~isempty(clustnum)
  
    out = false(length(clustdata.params(:,1)),1);
    index = clustattrib.clusters{clustnum}.index;
    [ma, maxchannel] = max(var(clustdata.params(index,2:5)));
    
    if length(index) > 2
        timediff = diff(clustdata.params(index,1));
        inpoints = find((timediff> 5000)&(timediff>5000))+1;
        out(index(inpoints)) = true;
    end
    
    
else
    out = [];
end
    
    
    

Contact us