Browse code

new parseVoxelTxtField getImageFileList reads files according to gui-settings voxel to subject coordinate mapping missing.

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@131 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on16/02/2009 17:32:42
Showing1 changed files
... ...
@@ -10,12 +10,14 @@ outstruct.eventMatrix = [];
10 10
 
11 11
 for i = 1:nClasses
12 12
     line = txt(i,:);
13
-    delim = strfind(line,','); %first and last are real delimiter
14
-
15
-    outstruct.labelCells{i} = strtrunc(line(1:delim(1)-1));
16
-    outstruct.conditionCells{i} = eval(strtrunc(line(delim(1)+1:delim(length(delim))-1)));
17
-    outstruct.eventMatrix   = [outstruct.eventMatrix ; outstruct.conditionCells{i}];
18
-    outstruct.valueCells{i} = strtrunc(line(delim(length(delim))+1:length(line)));
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];
19 21
 end
20 22
 
21 23
 end
Browse code

new LabelMap new svm grouping method

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@100 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on07/01/2009 18:26:33
Showing1 changed files
... ...
@@ -6,15 +6,16 @@ txt = get(model.txtClassDef,'String');
6 6
 
7 7
 nClasses = size(txt,1); % clear empty lines!
8 8
 
9
-outstruct.event = [];
9
+outstruct.eventMatrix = [];
10 10
 
11 11
 for i = 1:nClasses
12 12
     line = txt(i,:);
13 13
     delim = strfind(line,','); %first and last are real delimiter
14 14
 
15
-    outstruct.label{i} = strtrunc(line(1:delim(1)-1));
16
-    outstruct.event    = [outstruct.event ; eval(strtrunc(line(delim(1)+1:delim(length(delim))-1)))];
17
-    outstruct.value{i} = strtrunc(line(delim(length(delim))+1:length(line)));
15
+    outstruct.labelCells{i} = strtrunc(line(1:delim(1)-1));
16
+    outstruct.conditionCells{i} = eval(strtrunc(line(delim(1)+1:delim(length(delim))-1)));
17
+    outstruct.eventMatrix   = [outstruct.eventMatrix ; outstruct.conditionCells{i}];
18
+    outstruct.valueCells{i} = strtrunc(line(delim(length(delim))+1:length(line)));
18 19
 end
19 20
 
20 21
 end
Browse code

class def parsing added strtrunc.m

git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@94 83ab2cfd-5345-466c-8aeb-2b2739fb922d

Christoph Budziszewski authored on17/12/2008 18:42:12
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,20 @@
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
+
9
+outstruct.event = [];
10
+
11
+for i = 1:nClasses
12
+    line = txt(i,:);
13
+    delim = strfind(line,','); %first and last are real delimiter
14
+
15
+    outstruct.label{i} = strtrunc(line(1:delim(1)-1));
16
+    outstruct.event    = [outstruct.event ; eval(strtrunc(line(delim(1)+1:delim(length(delim))-1)))];
17
+    outstruct.value{i} = strtrunc(line(delim(length(delim))+1:length(line)));
18
+end
19
+
20
+end