Codes for part of the simulations in the manuscript "Predictive coding models for pain perception".
figure_4a.py to figure_4g.py are to generate figure panels in Fig.4
figure_5a,b,c.py and figure_6.py are to generate simulation results in Fig.5 and Fig.6 respectively, and save them in .mat format files for later plotting. Note these programs require heavy computation.
plot_fig_5.m and plot_fig_6.m are corresponding matlab codes for plotting Fig.5 and Fig.6 .
Please put all these files in the same folder.