loadwithbet.m 866 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. function [RHO_id_group, time]=loadwithbet(folder, partis)
  2. counter=1;
  3. for ppp=1:length(partis)
  4. counterf=1;
  5. for fff=1:4
  6. toload=[folder{fff}, partis{ppp,:},'.mat']
  7. load(toload)
  8. for item =1:3
  9. bi=(1:3~=item);
  10. if fff<3
  11. wi=RSA_obj_rot.trialinfo.object_1_id==item;
  12. else
  13. wi=RSA_obj_rot.trialinfo.object_2_id==item;
  14. end
  15. within(item,:)=squeeze(nanmean(RSA_obj_rot.rho(wi,item,:),1));
  16. between(item,:)=squeeze(nanmean(nanmean(RSA_obj_rot.rho(wi,bi,:),2),1));
  17. end
  18. RHO_id_group{counterf}(:,counter)=nanmean(within,1);
  19. counterf=counterf+1;
  20. RHO_id_group{counterf}(:,counter)=nanmean(between,1);
  21. counterf=counterf+1;
  22. RHO_id_group{counterf}(:,counter)=nanmean(within,1)-nanmean(between,1)
  23. counterf=counterf+1;
  24. end
  25. counter=counter+1;
  26. end
  27. time=RSA_obj_rot.time;
  28. end