Simulations of Reaching Adaptation and Control (Crevecoeur et al., 2022)

The code provided is the one that was used to produce the simulations in Fig. 6. The main script is script_AC.m, which calls several subroutines. The routine script_AC.m defines the online learning rates and simulate a series of trials with either only offline learning, or both offline and online learning. The offline component of learning is identical for the two series. It calls adaptiveReaching.m and adaptiveLQG.m. The former defines the model matrices and the latter runs the simulation of a movement trajectory. Importantly, these two subroutines are the same as those published with our previous study (Crevecoeur et al., eNeuro, 7(1), 2020) and can be accessed at this link: . Two other functions are added to the model files: the functions expfit.m and expfitdual.m, which are called to extract the time constants associated with exponential models including one or two decay rates, respectively. The routines also use the function nlinfit.m and nlparci.m of the Statistics and Machine Learning Toolbox (Mathworks, Matlab R2017b).

Simulation Environment: MATLAB

Implementer(s): Crevecoeur, Frédéric