Scheduled service maintenance on November 22


On Friday, November 22, 2024, between 06:00 CET and 18:00 CET, GIN services will undergo planned maintenance. Extended service interruptions should be expected. We will try to keep downtimes to a minimum, but recommend that users avoid critical tasks, large data uploads, or DOI requests during this time.

We apologize for any inconvenience.

dataProcessValid_Exp2.m 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. %Name: dataProcessValid.m
  2. %
  3. %Autor: Xuelian Zang
  4. %Description: process valid data for selected subjects with stable
  5. %performance
  6. %
  7. %Date: 22/09/2015
  8. function dataOut = dataProcessValid_Exp2(dataIn,Exp)
  9. try
  10. %% for the training session
  11. trainMeanSub = grpstats(dataIn.train.valid, {'New1','NE','NSub'},{'mean','numel'}, 'datavars',{'RT1','RT2'});
  12. trainMeanAllCombine = grpstats(trainMeanSub, {'New1','NE'},{'mean','sem','numel'}, 'datavars',{'mean_RT1','mean_RT2'});
  13. %o1E1 o1E2 o1E3 o1E4 o1E5 o0E1 o0E2 o0E3 o0E4 o0E5
  14. dataOut.forSpss.trainRTLeftCombine = dataset({reshape(trainMeanSub.mean_RT1, Exp.subNum, []),...
  15. 'o1E1', 'o1E2', 'o1E3', 'o1E4', 'o1E5' , 'o0E1', 'o0E2', 'o0E3', 'o0E4', 'o0E5'} );
  16. dataOut.forSpss.trainRTRightCombine = dataset({reshape(trainMeanSub.mean_RT2, Exp.subNum, []),...
  17. 'o1E1', 'o1E2', 'o1E3', 'o1E4', 'o1E5' , 'o0E1', 'o0E2', 'o0E3', 'o0E4', 'o0E5'} );
  18. testEp6MeanSub = grpstats(dataIn.test.valid, {'New1','NE','NSub'},{'mean','numel'}, 'datavars',{'RT1', 'RT2'});
  19. testEp6MeanAll = grpstats(testEp6MeanSub, {'New1','NE'},{'mean','sem','numel'}, 'datavars',{'mean_RT1', 'mean_RT2'});
  20. dataOut.forSpss.testEp6RTLeft = dataset({reshape(testEp6MeanSub.mean_RT1, Exp.subNum, []),'old','new'});
  21. dataOut.forSpss.testEp6RTRight = dataset({reshape(testEp6MeanSub.mean_RT2, Exp.subNum, []),'old','new'});
  22. %treat left and right participants as different subjects and combine
  23. %their data together
  24. dataCombine = dataset( {[trainMeanSub.New1 trainMeanSub.NE trainMeanSub.NSub trainMeanSub.mean_RT1; ...
  25. trainMeanSub.New1 trainMeanSub.NE trainMeanSub.NSub+Exp.subNum trainMeanSub.mean_RT2; ...
  26. testEp6MeanSub.New1 testEp6MeanSub.NE testEp6MeanSub.NSub testEp6MeanSub.mean_RT1; ...
  27. testEp6MeanSub.New1 testEp6MeanSub.NE testEp6MeanSub.NSub+Exp.subNum testEp6MeanSub.mean_RT2;], ...
  28. 'New', 'NE', 'NSub','meanRT'});
  29. tmp = grpstats(dataCombine, {'New','NE','NSub'},{'mean','numel'}, 'datavars',{'meanRT'});
  30. dataOut.forSpss.RTAllCombine = dataset({reshape(tmp.mean_meanRT, Exp.subNum*2, []),...
  31. 'o1E1', 'o1E2', 'o1E3', 'o1E4', 'o1E5' ,'o1E6','o0E1', 'o0E2', 'o0E3', 'o0E4', 'o0E5', 'o0E6'} );
  32. dataCombineMean = grpstats(dataCombine, {'New','NE'},{'mean','sem','numel'}, 'datavars',{'meanRT'});
  33. %plot the reaction time of experiemnt 2
  34. figure(); hold on; set(gcf,'Units','inches','Position',[2 2 6.83*0.5 6.83*0.5] );
  35. title('Joint condition');
  36. errorbar(1:5, dataCombineMean.mean_meanRT(1:5),dataCombineMean.sem_meanRT(1:5), 'k-o');
  37. errorbar(6, dataCombineMean.mean_meanRT(6),dataCombineMean.sem_meanRT(6), 'k-o');
  38. errorbar(1:5, dataCombineMean.mean_meanRT(7:11),dataCombineMean.sem_meanRT(7:11), 'k-*');
  39. errorbar(6, dataCombineMean.mean_meanRT(12), dataCombineMean.sem_meanRT(12), 'k-*');
  40. xlim([0.5 6.5]);
  41. ylabel('Reaction time (in Secs)');
  42. xlabel('Epochs');
  43. hold off;
  44. catch ME
  45. disp(ME.message);
  46. end