Dear Marko,
try the following code to obtain the degrees of freedom:
P = spm_get(1,'spmT*.img','Select result image');
[pth,nm,xt,vr] = fileparts(P);
SPM_name = fullfile(pth, ['SPM.mat' vr]);
load(SPM_name);
if strcmp(spm('ver'),'SPM2')
xCon = SPM.xCon;
df = SPM.xX.erdf;
else
xCon_name = fullfile(pth, ['xCon.mat' vr]);
load(xCon_name);
df = xX.erdf;
end
Best regards,
Christian
--
____________________________________________________________________________
Christian Gaser, Ph.D.
Department of Psychiatry
Friedrich-Schiller-University of Jena
Philosophenweg 3, D-07743 Jena, Germany
Tel: ++49-3641-935805 Fax: ++49-3641-935280
e-mail: [log in to unmask]
http://dbm.neuro.uni-jena.de
>Dear all,
>while I cannot answer the recent post on degrees of freedom, I have a
>more trivial problem: I owuld like to automatically read out the degrees
>of freedom when I load a spmT*.image. I gather that it is part of the
>iamge description but I am not sure how I can get that into a variable?
>Thanks in advance,
>Marko
>--
>=====================================================================
>Marko Wilke (Dr.med./M.D.)
> [log in to unmask]
>
>Universitäts-Kinderklinik University Children's Hospital
>Abt. III (Neuropädiatrie) Dept. III (Pediatric neurology)
> Hoppe-Seyler-Str. 1, D - 72076 Tübingen
>Tel.: (+49) 07071 29-83416 Fax: (+49) 07071 29-5473
>=====================================================================
|