-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgenerate_Fig4C.m
More file actions
30 lines (26 loc) · 962 Bytes
/
generate_Fig4C.m
File metadata and controls
30 lines (26 loc) · 962 Bytes
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
%% Figure 4C
%
% Relationship between matrix exponential and neural effect size
%
% (c) M.M. Garvert 2017
%%
clear all
close all
% Load data from ROI4
load('ROI4.mat') % format: subj x runs x obj trial t-1 x obj trial t
roi4 = squeeze(mean(roi4,2)); % average across experimental runs
%% Generate graph
% dist: distance between objects
[dist,graph] = generate_graph('off'); % 'on': plot graph structure, 'off': do not plot graph structure
matrix_exp = expm(double(graph==1)); % Matrix exponential
communicability = -matrix_exp(1:7,1:7); % communicability between pairs of objects presented on day 2
figure;
plot(squeeze(communicability(eye(7)~=1)),mean(roi4(:,eye(7)~=1)),'ko','MarkerSize',7)
lsline
hold on
gscatter(squeeze(communicability(eye(7)~=1)),mean(roi4(:,eye(7)~=1)),dist(eye(7)~=1), [],[], 20)
set(gcf,'color','w')
set(gca,'TickDir','out')
box off
xlabel('Communicability')
ylabel('Effect size (a.u.)')