-
Notifications
You must be signed in to change notification settings - Fork 0
/
cameg_VisPSD.m
62 lines (55 loc) · 1.63 KB
/
cameg_VisPSD.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
function cameg_VisPSD()
% ___________________________________________________________________________
% Connectivity analysis of MEG data (CA-MEG)
%
% Copyright 2016 Cincinnati Children's Hospital Medical Center
% Reference
%
%
% v1.0 Vahab Youssofzadeh 21/07/2016
% email: [email protected]
% ___________________________________________________________________________
load([pwd,'\saved outputs\cameg_datafile.mat']);
fh = length(findall(0,'type','figure'));
L = length(Atlas.Scouts);
figure(fh+1);
p1 = plot(10*log10(mpxx(:,2:29)'));
title('PSD');
for i = 1:L, lab{i} = num2str(i); end
clickableLegend(p1,lab, 'plotOptions', {'MarkerSize', 6});
box off
set(gca,'color','none');
xlim([2,29])
set(gcf, 'Position', [950 100 700 1200]);
mmpxx = squeeze(mean(mpxx(:,2:29),2));
figure(fh+2);
barh(mmpxx),
for j = 1:L, lab{j} = num2str(j); end
set(gca,'color','none');
title('PSD ');
set(gca,'ytick', 1:L,'ytickLabel',num2cell(1:L));
[~, idxp] = sort(mmpxx, 'descend');
idxp = idxp(1:nroi);
% figure(fh+1);
% hold on
% plot(10*log10(mpxx(idxp,2:29)'),'LineWidth',4);
% set(gcf, 'Position', [950 100 700 1200]);
% % clickableLegend(hl,lab, 'plotOptions', {'MarkerSize', 6});
% box off
% set(gca,'color','none');
% xlim([2,29])
figure(fh+2);
sig_mmpxx = zeros(1,length(mmpxx));
sig_mmpxx(idxp) = mmpxx(idxp);
hold on
h = barh(sig_mmpxx);
set(h, 'FaceColor', 'r')
set(gcf, 'Position', [200 100 700 1200]);
legend('PSD power','PSD power (ROIs)');
box off
id = table([1:nroi]','VariableNames',{'id'});
C = [id,ssROI]
% figure(fh+3);
% barh(mmpxx(idxp));
% set(gcf, 'Position', [200 100 700 1200]);
% legend('PSD power','PSD power (ROIs)');