Code to reproduce the figures and results reported in the following paper are published here along with simulation results and experimental data (all already in the public domain or released with agreement of the authors):
**Stochastic sampling provides a unifying account of visual working memory limits. Schneegans S, Taylor R & Bays PM. *Proceedings of the National Academy of Sciences* Aug 2020, 202004306 (2020)**
Code and data is in MATLAB format. File "run_order.m" illustrates a complete run through including simulations (note that the latter were run on a high-performance computing cluster: outputs are included in this release as MAT files).