fixed: parseVoxelList empty-Lines bug
Christoph Budziszewski

Christoph Budziszewski commited on 2008-12-17 18:04:50
Zeige 2 geänderte Dateien mit 4 Einfügungen und 6 Löschungen.


git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@93 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... ...
@@ -7,6 +7,7 @@ switch nargin
7 7
     case 1
8 8
         action = 'decode';
9 9
         paramModel = varargin{1};
10
+        SubjectID = getSubjectIDString(paramModel);
10 11
     otherwise
11 12
         error('spmtoolbox:SVMCrossVal:arginError','Please Specify action and parameter model');
12 13
 end
... ...
@@ -19,9 +20,6 @@ end
19 20
       
20 21
     case 'decode'
21 22
         
22
-        SubjectID = getSubjectIDString(paramModel);
23
-
24
-        
25 23
         display('loading SPM.mat');
26 24
 %         SubjectID = 'JZ006';
27 25
 %         SubjectID = 'AI020';
... ...
@@ -9,11 +9,11 @@ function voxelList = parseVoxelList(model)
9 9
         assignin('base','txt',txt);
10 10
         
11 11
         rows  = size(txt,1);
12
-        while all(isspace(txt(rows,:)))
13
-            rows = rows -1;
14
-        end
15 12
         
16 13
         for i = 1:rows 
14
+            if all(isspace(txt(i,:)))
15
+                continue;
16
+            end
17 17
             line = txt(i,:);
18 18
             roi = parseROIName(line);
19 19
             roimod = parseModifier(line);
20 20