These files contain the MATLAB code and data required to reproduce Figure 2-5 and Supplementary Figures S1-S4 of "Different mechanisms of contextual inference govern associatively learned and sensory-evoked postural responses". The Data folder contains .mat files with all trials of participants from group 1, 2, and 3 separately. Data includes the whole-body angle, forces and moments on the force plate, raw EMG data. Processing code is provided as 'main_classcal_conditioning.m', which performs EMG filtering, normalizing, calculation of derivatives. The file 'generate_figures' generates all figures. Note that minor aesthetic changes were made to the figures that appear in the manuscript.
The main processing code must be ran before figures can be generated. The data files must be in a folder called 'Data' that is stored in the same folder as the processing code. An error will be thrown if data cannot be found. All individual trials (Epochs) are collected a single MATLAB table, where each row corresponds to a trial. This table contains columns corresponding to the subject number, group, condition, and other metrics. The column 'T' stores the full timeseries data of each epoch.