master
Christoph Budziszewski class def parsing added str...

Christoph Budziszewski authored 15 years ago

1) function outstruct = parseClassDef(model)
2) outstruct = struct;
3) txt = get(model.txtClassDef,'String');
4) 
5) % txt =txt(find(all(isspace(txt(i,:))) ???
6) 
7) nClasses = size(txt,1); % clear empty lines!
8) 
Christoph Budziszewski new LabelMap new svm groupi...

Christoph Budziszewski authored 15 years ago

9) outstruct.eventMatrix = [];
Christoph Budziszewski class def parsing added str...

Christoph Budziszewski authored 15 years ago

10) 
11) for i = 1:nClasses
12)     line = txt(i,:);
Christoph Budziszewski new parseVoxelTxtField getI...

Christoph Budziszewski authored 15 years ago

13)     
14)     [label rem] = strtok(line,',');
15)     
16)     outstruct.labelCells{i} = strtrim(label);
17)     
18)     conds = eval(strtrim(rem(2:end)));
19)     outstruct.conditionCells{i} = conds;
20)     outstruct.eventMatrix   = [outstruct.eventMatrix ; conds];