annotate listeningTest/pairComp/PCpush.m @ 15:24be5e9ce25b tip

Update README
author Brecht De Man <brecht.deman@bcu.ac.uk>
date Thu, 20 Sep 2018 12:23:20 +0200
parents 5e72201496c8
children
rev   line source
b@0 1 function PCpush(hf,but)
b@0 2
b@0 3 dat=get(hf,'userdata');
b@0 4 noComb=dat.noComb;
b@0 5 comb=dat.comb;
b@0 6 ha=dat.ha;
b@0 7 hb=dat.hb;
b@0 8 butCol=dat.butCol;
b@0 9
b@0 10 switch but
b@0 11 case 1 % A
b@0 12 set(ha,'backgroundcolor','r');
b@0 13 set(hb,'backgroundcolor',butCol);
b@2 14 fidInd=['responses/' dat.sesDat.id,'_',dat.sesDat.sesScript]; %print 'A'
b@0 15 fid=fopen(fidInd,'a');
b@0 16 fprintf(fid,'A');
b@0 17 playSound(dat.sesDat.cuSndList(comb(noComb,1)));
b@2 18 case 2 % Stop ()
b@2 19 audioplayer(0,1);
b@0 20 case 3 % B
b@0 21 set(hb,'backgroundcolor','r');
b@0 22 set(ha,'backgroundcolor',butCol);
b@2 23 fidInd=['responses/' dat.sesDat.id,'_',dat.sesDat.sesScript];%print 'B'
b@0 24 fid=fopen(fidInd,'a');
b@0 25 fprintf(fid,'B');
b@0 26 playSound(dat.sesDat.cuSndList(comb(noComb,2)));
b@0 27 end