These are the codes for the figures that appear in "Dopamine firing plays a dual role in coding reward prediction errors and signaling motivation in a working memory task".
In the Data-Analisis folder the "main_analysis.m" script obtains the figures 1, 2, 4, 5 and 6 in the main text as well as Fig.S3.
In the FigS2 folder inside the Model-Simulations directory, the "Bayesian_Model_Fit_RT.m" script returns the supplementary figure number 2 as well as some other statistical descriptions.
In the Model-Simulations folder the scripts "Main_fig3.m" and "Main_fit_bayesian_model.m" return the figure 3 in the main text. The script "Main_RLmodel_figS1.m" returns FigS1 in the Suplementary Information.