help
help > RE: Excluding edges by replacing all values with zero
Jan 23, 2019 04:01 AM | Andrew Zalesky
RE: Excluding edges by replacing all values with zero
Hi Tessa,
if you have a matrix "x" of dimensions nodes by nodes by subjects, to set the connections between nodes 5 and 6 to zeros for all subjects, do the following:
x(5,6,:)=0; x(6,5,:)=0;
This will replace the the connection from 5 to 6 and from 6 to 5 to a value of 0.
This can be repeated for all the pairs of nodes that should be set to zero.
Andrew
Originally posted by tessa1:
if you have a matrix "x" of dimensions nodes by nodes by subjects, to set the connections between nodes 5 and 6 to zeros for all subjects, do the following:
x(5,6,:)=0; x(6,5,:)=0;
This will replace the the connection from 5 to 6 and from 6 to 5 to a value of 0.
This can be repeated for all the pairs of nodes that should be set to zero.
Andrew
Originally posted by tessa1:
Dear NBS users,
I'm new with Matlab and couldn't find a solution to my problem here or elsewhere.
I would like to exclude some edges where there are any connections in only few of the subjects - so e.g. exclude all the edges where there are no connections at all in 50% or 75% of the subjects in one group (I have two groups). I know this could be done by replacing all the values in single connection with a zero, but I don't know how to do that in Matlab. If someone has a ready script for this I would really appreciate the help! Right now there are some edges in my network where there are no connections at all in one of the groups, and I don't think that the t-test is appropriate for that situation.
BR,
Tessa
I'm new with Matlab and couldn't find a solution to my problem here or elsewhere.
I would like to exclude some edges where there are any connections in only few of the subjects - so e.g. exclude all the edges where there are no connections at all in 50% or 75% of the subjects in one group (I have two groups). I know this could be done by replacing all the values in single connection with a zero, but I don't know how to do that in Matlab. If someone has a ready script for this I would really appreciate the help! Right now there are some edges in my network where there are no connections at all in one of the groups, and I don't think that the t-test is appropriate for that situation.
BR,
Tessa
Threaded View
Title | Author | Date |
---|---|---|
tessa1 | Jan 17, 2019 | |
Andrew Zalesky | Jan 23, 2019 | |
tessa1 | Jan 28, 2019 | |