Browse code

multi-subject support

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

Christoph Budziszewski authored on05/01/2009 18:25:16
Showing1 changed files
... ...
@@ -1,9 +1,12 @@
1
-function s = getSubjectIDString(model)
1
+function s = getSubjectIDString(model) % TODO rename to getSubjectIDStringCellArray
2 2
     tmp_sidx =  get(model.subjectSelector,'Value');
3 3
     tmp_cellList = getSubjectCellList(model.subjectMap);
4
-    s = cell2mat(tmp_cellList(tmp_sidx));
5
-    if ~ischar(s)
6
-        error('spmtoolbox:SVMCrossVal:getSubjectID:NoString','convert error');
4
+
5
+    if size(tmp_sidx,2) >= 1
6
+        s = tmp_cellList(tmp_sidx);
7
+    else
8
+        error('spmtoolbox:SVMCrossVal:getSubjectID:NoSelection','no subject selected');
7 9
     end
10
+
8 11
 end
9 12
  
10 13
\ No newline at end of file
Browse code

GUI parsing halfway done.

working version

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

Christoph Budziszewski authored on17/12/2008 17:57:53
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,9 @@
1
+function s = getSubjectIDString(model)
2
+    tmp_sidx =  get(model.subjectSelector,'Value');
3
+    tmp_cellList = getSubjectCellList(model.subjectMap);
4
+    s = cell2mat(tmp_cellList(tmp_sidx));
5
+    if ~ischar(s)
6
+        error('spmtoolbox:SVMCrossVal:getSubjectID:NoString','convert error');
7
+    end
8
+end
9
+ 
0 10
\ No newline at end of file