The WMupt_allCode.m provides the order of the function to run. Specifically, the order is as follows:
**Main analysis:**
1) WMupdate_runERPs
2) WMupdateE1_doEyeTracking
3) WMupdateE1_RestructureforEEGLABGui
4) WMupdateE1_IEM
5) WMupt_E1_doPlotting_3dFigure_stimLocked_bothMoveAndStayTrials (this one produces Figure 2)
6) WMupt_E1_doCTFslopes
7) WMupdateE1_doPlotting_ctfSlope (Figure 3a - without significance lines)
8) WMupdateE1_SpatialEM_stimLocked_perm (runs the permutation test
9) WMupdateE1_calculateSlopes_Alpha
10) WMupdateE1_ClustPermTest (runs cluster based permutation test)
WMuptE1_plotCtfSlope_permTest (Figure 3a)
**Cross training analysis**
**Correlations with behavior**
1) WMupdateE1_IEM_forBehCorr **
2) WMupdateE1_calculateSlopes_forBehCorr **
3) WMuptE1_EEG_beh_correlations
** The same as WMupdateE1_IEM but matches the trial number to the behavioral data for more representative correlation between behavior and EEG.