The codes can be run on any system which can run matlab2012 or later versions. 
All codes have been tested.
The materials include all the needed matlab scripts which produce the figures in the manuscripts, a data folder includes all related data, and an output folder includes the output figures from the scripts (please note the colors of the figures maybe different from the figures in the paper).
To run the codes:
1, download the file, save and unzip the files into a local folder.
2, navigate to the folder in matlab.
3, open the scripts with matlab editor and click 'run', or input the name of scripts into the commend window to run the codes.

Figure2AB_behavior.m plots the behavior results in Figure2 (figure 2a and 2b).
Figure2CD_TarLR.m would plot the PSTH figures in Figure 2 (figure 2c and 2d).
Figure3AB_targetRight.m plots the histgrams in Figure 3 (a and b).
Figure3CD_targetRight.m plots the psth of figure 3c and the boxplots of figure 3d.
Figure4andS3_targetLeft.m plots all figures in Figure 4 and the Figure S3.
Figure5AC_allIncon.m plots the figure 5a and 5c.
Figure5BD_allIncon.m plots the figure 5b and 5d.
Figure6_attNCE.m plots the figure 6.
FigureS4ACD_attNCE.m plots the figure S4 ACD.
FigureS4BEF_attNCE.m plots the figure S4 BEF.
Fig3EFGH_FigS1CD_hist.m plots Figure 3EFGH and Figure S1C-J.
FigureS1A_targetRight.m plots Figure S1A.
FigureS1B_targetRight.m plots Figure S1B.
FigureS2ACE.m and FigureS2BDF.m plots the figures in Figure S2.

