### Matlab code for generating randomized networks with the same degree sequence and edge weight distribution as a target network and approximately the same edge length distribution and length-weight relationship.

*fcn_match_length_degree_distribution.m*

**Q: **When should I used this function?

**A: **If your application requires a rewiring-based null model that preserves basic spatial and structural properties.

### References:

### Betzel & Bassett (2017). The specificity and robustness of long-distance connections in weighted, inter-areal connectomes.

### Matlab code for generating consensus communities (requires the *genlouvain* package) from a set of pre-computed partitions.

*fcn_consensus_communities.m*

**Q: **When should I used this function?

**A: **When you've generated many partitions using modularity maximization or infomap and want a semi-principled, semi-supervised approach for getting an "average" partition.

**Note: **There are other nice software packages for generating consensus networks, e.g. work from Santo Fortunato & Olaf Sporns.

### References:

### Betzel & Bassett (2017). The specificity and robustness of long-distance connections in weighted, inter-areal connectomes

### Betzel et al (2017). The modular organization of human anatomical brain networks: Accounting for the cost of wiring [link].

### Betzel et al (2017). Inter-regional ECoG correlations predicted by communication dynamics, geometry, and correlated gene expression [link].

### Matlab code for estimating time-varying connectivity with tapered window.

*fcn_taper.m*

**Q: **When should I used this function?

**A: **It's just another way of estimating windowed functional connectivity. The difference is that it discounts distant (in the past) fluctuations.

### References:

### Betzel et al (2016). Dynamic fluctuations coincide with periods of high and low modularity in resting-state functional brain networks [link]

### note: Eq. 3 and Eq. 4 in the above paper have errors. The variable *N *in Eq. 3 should be *L.* Eq. 4 should not have a square root.

### Matlab code for generating group-representative networks with a distance-dependent consistency threshold.

*fcn_distance_dependent_threshold.m*

**Q**: When should I use this function?

**A: **This function generates group representative *structural connectivity matrices* that preserve the connection length (in physical space) distribution of individual subjects. This small change causes other network measures made on the group matrix to appear more similar to those made on individual subject matrices.

### References:

### Betzel et al (2018). Distance-dependent consistency thresholds for generating group-representative structural brain networks.