>> is there any way to prevent SPM from sweeping my matlab workspace
>> when I hit 'quit'? It always takes all other variables with it
>> which can be slightly annoying.
>
> ... only if you change the code of spm.m ...
I think if you change line 1119 from
'CallBack','spm(''Quit''), clear all')
to just
'CallBack','spm(''Quit'')')
then that should do the trick (though I haven't tested it).
Alternatively, and perhaps more easily, you could just save the
workspace before you quit (since you can still enter Matlab commands
while the SPM GUI is up, as long as it's not busy doing something).
Something simple should be okay,
save % now quit SPM
load % should get workspace back
delete('matlab.mat') % tidy up if desired
but you might want to give a path to a temporary folder, and maybe a
time-stamp etc, depends what you really want to do...
Hope that helps,
Ged.
|