diff listeningTest/reportTest.m @ 0:4fd284285159

Adding listening test plus some helpful functions and scripts.
author Brecht <b.deman@qmul.ac.uk>
date Thu, 24 Apr 2014 23:53:31 +0100
parents
children 5e72201496c8
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/listeningTest/reportTest.m	Thu Apr 24 23:53:31 2014 +0100
@@ -0,0 +1,19 @@
+function fid=reportTest(sesDat,rsl,typeTst)
+% write report
+
+fidInd=['responses/' sesDat.id,'_',sesDat.sesScript];
+if (~sesDat.reREAD && (sesDat.noTst==1))
+   fid=fopen(fidInd,'w');
+else   
+   fid=fopen(fidInd,'a');
+end
+eol(fid);
+
+% title
+fprintf(fid,'%%%%%%%%%%%% Module #%d : %s \t ID: %s  \t DATE: %s ',sesDat.noTst,typeTst,sesDat.id,date);eol(fid);eol(fid);
+
+% elapsed time
+min=floor(rsl.duration/60);
+sec=floor(rsl.duration-min*60);
+fprintf(fid,'%%%% ELAPSED TIME : %d min %d sec ',min,sec);eol(fid);
+fprintf(fid,'Song: %s\n', sesDat.cuSndListFile);
\ No newline at end of file