Mercurial > hg > dcase2013_sc_rnh
view loadClassificationOutput.m @ 2:def2b3fa1450 tip master
corrected README
author | Gerard Roma <gerard.roma@upf.edu> |
---|---|
date | Mon, 04 Nov 2013 10:46:05 +0000 |
parents | 96b1b8697b60 |
children |
line wrap: on
line source
% from https://soundsoftware.ac.uk/projects/aasp-d-case-metrics function [fileID,classID] = loadClassificationOutput(filename) % Open raw file fid = fopen(filename,'r+'); % Read 1st line tline = fgetl(fid); fileID{1} = char(sscanf(tline, '%s\t%*s')); classID{1} = char(sscanf(tline, '%*s\t%s')); % Read rest of the lines i=1; while ischar(tline) i = i+1; tline = fgetl(fid); if (ischar(tline)) fileID{i} = char(sscanf(tline, '%s\t%*s')); classID{i} = char(sscanf(tline, '%*s\t%s')); end; end % Close file fclose(fid);