diff --git a/spike_sorting.m b/spike_sorting.m index 0f0008a..553ba0e 100644 --- a/spike_sorting.m +++ b/spike_sorting.m @@ -121,7 +121,6 @@ for fileIndex=1:4 dataMedian = median(abs(data)/0.6745); factorEstimation = polyval(empiricalRule, dataMedian); - %factorEstimation = 4; threshold = factorEstimation * dataMedian; numberOfSpikes = 0; spikesTimesEst(2500) = 0; @@ -285,9 +284,10 @@ for fileIndex=1:4 dbScanClasses(dbScanClasses==3) = 1; dbScanClasses(dbScanClasses==7) = 3; elseif fileIndex == 3 - dbScanClasses(dbScanClasses==1) = 7; - dbScanClasses(dbScanClasses==2) = 1; - dbScanClasses(dbScanClasses==7) = 2; + dbScanClasses(dbScanClasses==3) = 7; + dbScanClasses(dbScanClasses==2) = 3; + dbScanClasses(dbScanClasses==1) = 2; + dbScanClasses(dbScanClasses==7) = 1; elseif fileIndex == 4 dbScanClasses(dbScanClasses==3) = 7; dbScanClasses(dbScanClasses==2) = 3; @@ -342,10 +342,10 @@ for fileIndex=1:4 kMeansClasses(kMeansClasses==2) = 1; kMeansClasses(kMeansClasses==7) = 2; elseif fileIndex == 3 - kMeansClasses(kMeansClasses==1) = 7; - kMeansClasses(kMeansClasses==2) = 1; + kMeansClasses(kMeansClasses==2) = 7; kMeansClasses(kMeansClasses==3) = 2; kMeansClasses(kMeansClasses==7) = 3; + %kMeansClasses(kMeansClasses==7) = 3; elseif fileIndex == 4 kMeansClasses(kMeansClasses==3) = 7; kMeansClasses(kMeansClasses==2) = 3;