Mercurial > hg > emotion-detection-top-level
diff Code/General/readValueFromFile.m @ 4:92ca03a8fa99 tip
Update to ICASSP 2013 benchmark
author | Dawn Black |
---|---|
date | Wed, 13 Feb 2013 11:02:39 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Code/General/readValueFromFile.m Wed Feb 13 11:02:39 2013 +0000 @@ -0,0 +1,14 @@ +function [] = readValueFromFile( statsFileID, metricFileName, metricName ) + +FileID = fopen( metricFileName ); + +if( FileID <= 0 ) %does the file exist? + % if not + message = ['WARNING: MISSING ' metricName ' FILE']; + disp( message ); + fprintf( statsFileID, '\t \s missing', metricName ); +else + value = fscanf( FileID, '%f', inf ); + fprintf( statsFileID, '\t %f ', value ); + fclose( FileID ); +end \ No newline at end of file