Mercurial > hg > emotion-detection-top-level
comparison Code/General/readValuesFromFile.m @ 4:92ca03a8fa99 tip
Update to ICASSP 2013 benchmark
author | Dawn Black |
---|---|
date | Wed, 13 Feb 2013 11:02:39 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:e1cfa7765647 | 4:92ca03a8fa99 |
---|---|
1 function [ metrics, nanValues ] = readValuesFromFile( statsFileID, metricFileName, metricName ) | |
2 | |
3 FileID = fopen( metricFileName ); | |
4 | |
5 if( FileID <= 0 ) %does the file exist? | |
6 % if not | |
7 message = ['WARNING: MISSING ' metricName ' FILE']; | |
8 disp( message ); | |
9 fprintf( statsFileID, '\t \s missing', metricName ); | |
10 metrics=0; | |
11 nanValues=0; | |
12 else | |
13 metrics = fscanf( FileID, '%f', inf ); | |
14 % remove the frame numbers | |
15 metrics = metrics(2:2:end); | |
16 % remove all 'NaN' values | |
17 nanValues = isnan(metrics); | |
18 metrics = metrics(~(nanValues)); | |
19 % fprintf( statsFileID, '\t %f ', value ); | |
20 fclose( FileID ); | |
21 end |