Browse code

coordTabel works for JZ006

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

Christoph Budziszewski authored on25/02/2009 15:49:55
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,45 @@
1
+%% subject loop
2
+function decode = claculateMultiSubjectDecodePerformance(timelineParams,calculateParams,paramModel)
3
+
4
+decode = struct;
5
+decode.decodePerformance = [];
6
+decode.rawTimeCourse     = [];
7
+
8
+for subjectCell = calculateParams.subjectSelection
9
+    SubjectID = cell2mat(subjectCell);
10
+    namehelper = strcat('s',SubjectID); %Vars can not start with numbers.
11
+
12
+    display('loading SPM.mat ...');
13
+    spm = load(fullfile(calculateParams.PROJECT_BASE_PATH,SubjectID,calculateParams.PROJECT_RESULT_PATH));
14
+    display('... done.');
15
+
16
+    % per subject params..
17
+    subjectParams = struct;
18
+    
19
+    subjectParams.des             = spm.SPM;
20
+
21
+
22
+    subjectParams.voxelList       = mapVoxelList(voxelList,SubjectID);
23
+
24
+    
25
+    subjectParams.SubjectID       = SubjectID;
26
+    subjectParams.namehelper      = namehelper;
27
+%     assignin('base','calculateParams',calculateParams);
28
+
29
+    display(sprintf('calculating cross-validation performance time-shift for Subject %s. Please Wait. ...',SubjectID));
30
+    display('switching off all warnings');
31
+    warning_state               = warning('off','all');
32
+    display('calculating ...');
33
+    decode.(namehelper)         = calculateDecodePerformance(timelineParams,calculateParams,subjectParams);
34
+
35
+    display('... done');
36
+    display('restoring warnings');
37
+    warning(warning_state);
38
+
39
+    decode.decodePerformance    = [decode.decodePerformance decode.(namehelper).decodePerformance];
40
+    decode.rawTimeCourse        = [decode.rawTimeCourse decode.(namehelper).rawTimeCourse];
41
+
42
+    assignin('base','decode',decode);
43
+end
44
+
45
+end