dataProcessAll_Exp3.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. %% xuelian zang
  2. %% 10/05/2013
  3. %% analyse all the data
  4. %%
  5. function dataProcessAll_Exp3()
  6. try
  7. close all
  8. clc
  9. clear all
  10. Exp.nEp = 5;
  11. Exp.nEpT = 1;
  12. Exp.nTB = 5;
  13. Exp.nB = 25;
  14. Exp.nTrl = 24;
  15. Exp.numOfBlock.TrainEpoch = 5;
  16. Exp.numOfBlock.TransferEpoch = 5;
  17. RTTh.low = 0.2;
  18. RTTh.ratio = 2.5;
  19. RTTh.high_RT1 = 0; % 0: discard with ratio
  20. RTTh.high_RT2 = 0;
  21. numOfDisTrials = 0;
  22. %% for all subjects
  23. Exp.subNum = 16; %% 12 with positive cueing, 3 with negative cueing
  24. %% load Exp3 behavior data
  25. load('Exp3_AllData.mat');
  26. data = AllData;
  27. dataOutAll = dataProcessValid_Exp3(data, Exp);
  28. %%error and miss together
  29. errData1 = calError(data, Exp);
  30. mErrRates = mean(mean(errData1.errSpssArray,2))
  31. mErrRatesTrain = mean(mean(errData1.errSpssArray(:,[1:5 7:11]),2))
  32. mErrRatesTransfer = mean(mean(errData1.errSpssArray(:,[6 12]),2))
  33. mDisRates = mean(mean(errData1.disSpssArray,2))
  34. %% hitFalseArray1: hitLeftSub, FALeft, hitRight, FARight
  35. %% d: leftSub RightSub
  36. [hitFalseArray, d] = procRec(data);
  37. catch ME
  38. disp(ME.message);
  39. end