Print

Print


Hi,

I don't know if this was mentioned before but the latest version of spm 
doesn't allow me to change directory names of result directories.

Older versions of spm didn't store the full qualified names (with path) but 
only the file names of eg the con_0001.img. The latest version saves the full 
path. 

K>> SPM.xCon.Vspm

ans = 

      fname: '/loctmp/Statistik/T-Tests/test/spmT_0001.img'


If the path doesn't exist there is a (IMHO broken) fall back in 
spm_get_data.m:
    if exist(V(i).fname,'file') ~=2
        [p,n,e]    = fileparts(V(i).fname);
        V(i).fname = fullfile(n,e);
    end

Unfortunately fullfile is not meant to put an extension on a file name (at 
least in matlab 2006/2007). So the line should be:

V(i).fname = strcat(n,e);

otherwise there's a file separator between the filename and its extension.

This leaves a problem: I the old path still exists because of a copy or a new 
analysis or just by chance, one might get an unexpected result. Or am I 
missing something here?

Regards and a nice weekend,

Roland


-- 
Dr. Roland Marcus Rutschmann <[log in to unmask]>
Institute for Experimental Psychology, University of Regensburg
Universitätsstraße 31, 93053 Regensburg, Germany
Tel: +49 941 943 2533, Fax: +49 941 943 3233
http://www.psychologie.uni-regensburg.de/Rutschmann