0001 function labVec=mlfRead(mlfFile)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 fid=fopen(mlfFile);
0012 tline = fgetl(fid);
0013 if ~strcmp(tline, '#!MLF!#')
0014 fprintf('The first line of %s is not #!MLF!#!\n', mlfFile);
0015 error('Wrong format!');
0016 end
0017
0018 i=0;
0019 while 1
0020 tline = fgetl(fid);
0021 if ~ischar(tline), break, end
0022 fileName=sscanf(tline(1:end-1), '"*/%s');
0023 if ~isempty(fileName)
0024 i=i+1;
0025 labVec(i).fileName=fileName;
0026 labVec(i).syl=[];
0027 continue;
0028 end
0029 if strcmp(tline, '.')
0030 continue;
0031 end
0032 labVec(i).syl{end+1}=tline;
0033
0034 end
0035 fclose(fid);