0001 function plp=plpRead(plpFile)
0002
0003
0004
0005
0006
0007
0008
0009
0010 contents=textread(plpFile, '%s', 'delimiter', '\n', 'whitespace', '');
0011 lineNum=length(contents);
0012
0013 k=1;
0014 index=1;
0015 while index<=lineNum
0016 line=contents{index};
0017 if length(line)==0
0018 index=index+1;
0019 continue;
0020 end
0021 if line(1)=='%'
0022 index=index+1;
0023 continue;
0024 end
0025 items=split(line, ' ');
0026 if length(items)==3
0027 plp(k).modelName=items{1};
0028 plp(k).modelIndex=eval(items{2})+1;
0029 plp(k).frameNum=eval(items{3});
0030 index=index+1;
0031 plp(k).compModelIndex=sscanf(contents{index}, '%d');
0032 plp(k).compModelIndex=plp(k).compModelIndex+1;
0033 index=index+1;
0034 plp(k).compModelProb =sscanf(contents{index}, '%f');
0035 index=index+1;
0036 k=k+1;
0037 end
0038 end