1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- %% Figure 1D - Task performance
- %
- clear all
- close all
- %%
- %Inital learning
- Hit_P = [0.7619 0.9762 0.9762 1 1 1]; %Initial Hit
- FA_P = [0.9184 1 0.8367 0.1633 0.04 0.0408]; %Initial FA
- CatchFA_P = [0.8163 1 0.6735 0.2041 0.0612 0.0816]; %Initial catchFA
- %Reversal learning
- Rev_Hit_P = [0.0476 0.9762 1 1 1]; %Reversal Hit
- Rev_FA_P = [0.3265 1 0.7188 0.3673 0.4082]; %Reversal FA
- Rev_CatchFA_P = [0.0408 0.9796 0.7000 0.3673 0.6531]; %Reversal catchFA
- for iLearning = 1:2
- %1 = Initial, 2 = Reversal
- switch iLearning
- case 1
- Hit = Hit_P;
- FA = FA_P;
- CatchFA = CatchFA_P;
- figure('Name', ['Initial_TaskPerfrmance'])
- set(gcf,'Position',[170 250 220 320])
- Position = 'southwest';
- FigTitle = 'Initial';
- case 2
- Hit = Rev_Hit_P;
- FA = Rev_FA_P;
- CatchFA = Rev_CatchFA_P;
- figure('Name', ['Reversal_TaskPerfrmance'])
- set(gcf,'Position',[170 250 220 320])
- Position = 'southeast';
- FigTitle = 'Reversal';
- end
-
- NofSession = size(Hit,2);
- plot(Hit', '-o', 'color',[0.25 0.85 0.25],'MarkerFaceColor',[0.25 0.85 0.25]);
- hold on;
- plot(FA', '-o', 'color','r','MarkerFaceColor','r');
- plot(CatchFA', '-o', 'color', [0.5 0.5 0.5],'MarkerFaceColor', [0.5 0.5 0.5]);
- title(FigTitle);
-
- xlim([0 NofSession+1]);
- ylim ([0 1.1]);
-
- NofXticks = 1:1:NofSession;
- xticks(NofXticks);
- yticks([0 1.0]);
-
- xlabel('Session')
- ylabel('Response ratio')
- box off
-
- %legend
- legend('Hit', 'FA', 'CatchFA', 'location', Position);
- legend box off
-
- end %for iLearning
|