Print

Print


'lo Stephen,

can't really comment about the class stuff.
But I've also noticed the reduction in file size when saving the SPM 
structure manually (some student here was also scared he had lost bits 
of his design...).
I bet you're using Matlab 7.
In order to render spm compatible across different Matlab versions 
(mainly 6 and 7), files are systematically saved under "matlab 6 
format". Check for yourself around line 956 and below in spm_spm.
Files saved in "matlab 7 format" are much more compact than in "matlab 6 
format", hence the size difference if you save the SPM structure 
manually but no information is lost.

Try
save('SPM.mat',SPM,'-v6)
and you should then get the same file size.

HTH,
Chris

Stephen J. Fromm a écrit :
> Is there any way to safely delete contrasts in SPM5?
>
> Naively, I would just
>     load SPM
> then do
>     SPM.xCon = [];
> then
>     save SPM SPM
> but I'm a little leary of this because (a) I'm new to SPM5, (b) there's 
> this new stuff using matlab classes.(*)
>
> (*) One weirdness (here, SPM.mat is after estimating a second level model, 
> but before running any second level contrasts):
> - If I load SPM.mat without putting SPM5 in my matlab path, I get 
> an "unknown object class error."  If I go ahead and type
>     save SPM SPM
> the resulting file is much smaller.
> - If I have SPM5 in the matlab path, and then load SPM, I no longer get 
> the unknown class error.  But if I save SPM to SPM.mat, it's still much 
> smaller than it was before I loaded it.
>
>
>