Matlab > 2016 is required to run this code.
You need to have ELAT software in you matlab path: https://sites.google.com/site/ezakitakahiro/software.
To run it you should have your MEG data in source space (e.g using LMCV Beamforming) in .mat
format in data
folder relative to this path.
- Start with running:
run_all.m
and set parameters at the top of the script according to your needs. make_envelope.m
- computes Hilbert envelope of the signal in given frequency.bestThreshold.m
looks for the best threshold that maximizedr
(relative KL divergence betweem pMEM and empirical data).enerland_simulation.m
simulated the data based on the basinGraph. It used Metropolis-Hastings algorithm implemented inmetrophastings.m
.plot_3d_activations.m
usesSourceMesh
package to plot 3D activation of brain regions.shuffleJh.m
is used for bootstraping for statistical analysis of the energy values.