multiple searchlight radii, bugfix
Christoph Budziszewski

Christoph Budziszewski commited on 2009-04-26 22:19:19
Zeige 1 geänderte Dateien mit 4 Einfügungen und 3 Löschungen.


git-svn-id: https://svn.discofish.de/MATLAB/spmtoolbox/SVMCrossVal@188 83ab2cfd-5345-466c-8aeb-2b2739fb922d
... ...
@@ -142,8 +142,8 @@ for timeShiftIdx = fbsTimeLine
142 142
     frameStartIdx  = floor(-globalStart+1+timeShiftIdx - 0.5*decodeDuration);
143 143
     frameEndIdx    = min(ceil(frameStartIdx+decodeDuration + 0.5*decodeDuration),-globalStart+globalEnd);
144 144
 
145
-        for r = 1:length(radiusList)
146
-            img3D{r} = zeros(size(mask_image)); %output image prepare
145
+        for rIdx = 1:length(radiusList)
146
+            img3D{rIdx} = zeros(size(mask_image)); %output image prepare
147 147
         end
148 148
         
149 149
         for iVoxel = 1:nVoxel % linear structure avoids 3D-Loop.
... ...
@@ -191,7 +191,8 @@ for timeShiftIdx = fbsTimeLine
191 191
             end %for each radius
192 192
         end %for each voxel
193 193
 
194
-        for radius = radiusList
194
+        for rIdx = 1:length(radiusList)
195
+            radius = radiusList(rIdx);
195 196
             nii = make_nii(img3D{radius},vdim,mask_image.hdr.hist.originator(1:3),16,...
196 197
                 sprintf('decode performance, time relative to onset: %g to %g sec',frameStartIdx,frameEndIdx));
197 198
             save_nii(nii,fullfile(savePath,sprintf('%s-r%g-t%+03g',subjects{s}.name,radius,timeShiftIdx)));
198 199