This code reproduces Figure 6 of the publication (Non-Markovian sequence learning and recall). To perform the simulation, open and run "non_markovian_main.m" Parameters can be found/modified in "parameters_rate_final.m" Initial weights for the modular net can be found/modified in "weight_initialization_final.m" The pattern of input stimulation can be found/modified in "stim_init_final.m" This code was written and run in MATLAB 2020a. Please direct any questions to iancone(at)rice(dot)edu.