Code for the simulations published in "Morphogenesis as bayesian inference: A variational approach to pattern formation and control in complex biological systems", F. Kuchling, K. Friston, G. Georgiev, M. Levin, Physics of Life Reviews 2019.
To run this code, you must first download the SPM 12 package from https://www.fil.ion.ucl.ac.uk/spm/software/ and put all the files in it into your path in matlab.