-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo.m
48 lines (37 loc) · 1.48 KB
/
demo.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
%% Load spikes from a raw recording, as detected by the Mea1kServer
load('NeuroFun/demoData/demoSpike.map')
load('NeuroFun/demoData/mapP.map')
dist=mapP
%% Restrict to first 30 seconds
demoSpike.C=demoSpike.C(demoSpike.T<30);
demoSpike.T=demoSpike.T(demoSpike.T<30);
demoSpike.A=demoSpike.A(demoSpike.T<30);
%% Perform full analysis
demoChar = neuroFun(demoSpike)
%% Plot results
% 2D correlations
plots.plot2DCorr(demoChar.histCorrelNb,'Histogram-based correlation');
plots.plot2DCorr(demoChar.sttcCorrelNb,'STTC');
% Correlation vs distance
plots.plotCorrDist(demoChar.histCorrelNb,dist,...
'Histogram-based correlation vs distance');
plots.plotCorrDist(demoChar.histCorrelNb,dist,...
'STTC vs distance');
% Burst features
plots.plotDist(demoChar.Burst.length,'Burst lengths','Demo sample',...
'Length [s]');
plots.plotDist(demoChar.burstChar.CV_IBI(demoChar.burstChar.CV_IBI>0)...
,'CV of IBI per electrode','Demo Sample','CV');
% Network features
% Enable only if BCT is installed and the calculations were run
%figure;plot([1:100],demoChar.netChar.mod)
%set(gca,'FontSize',20);
%title('Modularity');
%xlabel('% of connections considered (in order of strenght)');
%ylabel('Modularity');
%% Compare distributions (useful for multiple samples)
data=[];
data{1}=demoChar.burstChar.CV_IBI(demoChar.burstChar.CV_IBI>0);
data{2}=demoChar.burstChar.CV_withinBurstISI(demoChar.burstChar.CV_withinBurstISI>0);
plots.plotNDist(data,'Comparison',...
{'CV of IBI' 'CV of ISI within Burst'},'Value');