Skip to content

Commit 37dd9e9

Browse files
committed
Authorship added
1 parent 8da7903 commit 37dd9e9

25 files changed

+75
-257
lines changed

closeness_bin.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22
%CLOSENESS_CENTRALITY closeness centrality.
33
%
44
% [ccen] = closeness_bin(CIJ)
5+
%
6+
% -David Grayson 2015
57

68
N=size(CIJ,1)-1;
79
D=distance_bin(CIJ);
8-
ccen=N./sum(D);
10+
ccen=N./sum(D);

closeness_wei.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
%CLOSENESS_CENTRALITY closeness centrality.
33
%
44
% [ccen] = closeness_wei(CIJ)
5+
%
6+
% -David Grayson 2014
57

68
n=size(CIJ,1);
79
ind = CIJ~=0;
810
CIJ(ind) = 1./CIJ(ind); %connection-length matrix
911

1012
D=distance_wei(CIJ);
1113
D(1:n+1:end)=0; %set diagonal to 0
12-
ccen=(n-1)./(sum(D)/2);
14+
ccen=(n-1)./(sum(D)/2);

communicability_bin.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
%
2020
% Output: Cglob, global communicability (scalar)
2121
% Cloc, local communicability (vector)
22+
%
23+
% -David Grayson 2014
2224

2325
n = size(A,1);
2426

@@ -32,4 +34,4 @@
3234
else
3335
G(1:n+1:end) = 0; %set diagonal to 0
3436
C=sum(G(:))/(n*(n-1)); %total communicability (scalar)
35-
end
37+
end

communicability_centrality_bin.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
%
1111
% A must be a binary undirected or directed adjacency matrix
1212
% CBC will be a row vector of the communicability centralities of nodes
13+
%
14+
% -David Grayson 2014
1315

1416
n = size(A,1);
1517
oneu=triu(ones(n,n),1);

communicability_centrality_wei.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
%
1111
% W must be a weighted undirected or directed adjacency matrix
1212
% CBC will be a row vector of the communicability centralities of nodes
13+
%
14+
% -David Grayson 2014
1315

1416
n = size(W,1);
1517
oneu=triu(ones(n,n),1);

communicability_wei.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
%
2020
% Output: Cglob, global communicability (scalar)
2121
% Cloc, local communicability (vector)
22+
%
23+
% -David Grayson 2014
2224

2325
n = size(W,1);
2426

@@ -32,4 +34,4 @@
3234
else
3335
G(1:n+1:end) = 0; %set diagonal to 0
3436
C=sum(G(:))/(n*(n-1)); %total communicability (scalar)
35-
end
37+
end

compute_modularity.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
%COMPUTE_MODULARITY computes Q from input matrix and community vector.
33
%
44
% Q = compute_modularity(W,ci)
5+
%
6+
% -David Grayson 2014
57

68
N=length(W);
79
K=sum(W); %degree

convertMAT3D_MYcom_wei.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@
66
%
77
% Inputs:
88
% - subject_array_3D is a 3D matrix of individual 2D weighted
9-
% undirected matrices with subjects in 3rd dimension
9+
% (un)directed matrices with subjects in 3rd dimension
1010
% diagonal of 2D matrices should be 0
1111
% - order means you want to include walks up to what length (1 is
1212
% monosynaptic, 2 is disynaptic, 3 trisynaptic, etc.)
1313
% - af is attenuation factor: the penalty factor by which you multiply
1414
% for every additional step taken (0<af<1)
1515
%
1616
% Example: G_3D = convertMAT3D_MYcom_wei(subject_array_3D,5,.5);
17-
17+
%
18+
% -David Grayson 2014
1819

1920
slen=size(subject_array_3D,3);
2021
sx=size(subject_array_3D,1);
@@ -30,4 +31,4 @@
3031
end
3132

3233
COM_3D(:,:,s)=G;
33-
end
34+
end

convertMAT3D_SI_und.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
% subject_array_3D. converts them to search information matrices.
77
% based on methods in Goni 2014 PNAS: Resting-brain functional connectivity
88
% predicted by analytic measures of network communication
9+
%
10+
% -David Grayson 2014
911

1012
slen=size(subject_array_3D,3);
1113

@@ -44,4 +46,4 @@
4446

4547
%% add to 3D matrix
4648
SI_3D(:,:,su)=Gsi;
47-
end
49+
end

convertMAT3D_com_bin.m

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
%
77
% Inputs:
88
% subject_array_3D is a 3D matrix of individual 2D binary
9-
% undirected matrices with subjects in 3rd dimension
9+
% (un)directed matrices with subjects in 3rd dimension
1010
% diagonal of 2D matrices should be 0
11-
11+
%
12+
% -David Grayson 2014
1213

1314
slen=size(subject_array_3D,3);
1415

@@ -17,4 +18,4 @@
1718
G=expm(W); %communicability matrix
1819

1920
COM_3D(:,:,s)=G;
20-
end
21+
end

0 commit comments

Comments
 (0)