git.schokokeks.org
Repositories
Help
Report an Issue
SVMCrossVal.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
c1c9c7d
Branches
Tags
master
SVMCrossVal.git
private
parseClassDef.m
class def parsing added strtrunc.m
Christoph Budziszewski
commited
c1c9c7d
at 2008-12-17 18:42:12
parseClassDef.m
Blame
History
Raw
function outstruct = parseClassDef(model) outstruct = struct; txt = get(model.txtClassDef,'String'); % txt =txt(find(all(isspace(txt(i,:))) ??? nClasses = size(txt,1); % clear empty lines! outstruct.event = []; for i = 1:nClasses line = txt(i,:); delim = strfind(line,','); %first and last are real delimiter outstruct.label{i} = strtrunc(line(1:delim(1)-1)); outstruct.event = [outstruct.event ; eval(strtrunc(line(delim(1)+1:delim(length(delim))-1)))]; outstruct.value{i} = strtrunc(line(delim(length(delim))+1:length(line))); end end