Hi Ian,
Those are the only modifications I made, and I have yet to run into any
problems. I suggest making sure that you have not accidentally commented
out or deleted any lines (especially the one defining 'opts'). Below is the
relevant section copy/pasted from my
spm_print file, and I've attached my whole spm_print.m if you want to take a
look or just use it yourself.
%revised by Neil Chatterjee
% t = clock; %OLD
% nam = ['spm_' num2str(t(1)) mon{t(2)} sprintf('%.2d',t(3))]; %OLD
t = fix(clock); %NEW
nam = ['spm_' num2str(t(1)) mon{t(2)} sprintf('%.2d',t(3)) '_'
sprintf('%.2d',t(4)) sprintf('%.2d',t(5)) sprintf('%.2d',t(6))]; %NEW
%end revised part
Hopefully this will fix your issue.
Regards,
Neil
On Thu, 20 Nov 2008 14:16:26 +0000, Ian Charest
<[log in to unmask]> wrote:
>Dear Neil
>
>following your thread with Mathieu, I tried making the modifs in spm5,
>but I get this error message
>
>Error running job: Undefined variable "opts" or class "opts".
>In file "/usr/matlab/toolbox/spm5/spm_print.m" (V902), function
>"spm_print" at line 60
>In file "/usr/matlab/toolbox/spm5/spm_realign.m" (v1030), function
>"plot_parameters" at line 482
>In file "/usr/matlab/toolbox/spm5/spm_realign.m" (v1030), function
>"spm_realign" at lign 146.
>In file "/usr/matlab/toolbox/spm5/spm_config_realign.m" (v751), function
>"estwrite_fun" at line 420.
>
>Would you know if some further modifications are needed for the change
>to work?
>
>Regards
>
>Ian Charest
>
>
>Neil Chatterjee wrote:
>> Hi Matthieu,
>>
>> I just replied to something similar to this for realignment in spm5. I have
not
>> looked at spm8 at all, so I apologize if this is a completely different problem.
If
>> so, please ignore the following.
>>
>> That said, if printing works the same as in spm5, then each file is being
saved
>> with only the date in the filename, correct? Thus multiple files from the
same
>> day will overwrite each other. To fix this, in spm5 at least, go to spm_print
>> and change
>>
>> t = clock;
>> nam = ['spm_' num2str(t(1)) mon{t(2)} sprintf('%.2d',t(3))];
>>
>> to
>>
>> t = fix(clock);
>> nam = ['spm_' num2str(t(1)) mon{t(2)} sprintf('%.2d',t(3)) '_'
>> sprintf('%.2d',t(4)) sprintf('%.2d',t(5)) sprintf('%.2d',t(6))];
>>
>> Now files will be saved looking something like spm_2008Nov19_152536.ps
>> instead of spm_2007Nov19.ps. Again, apologies if this is not relevant to
your
>> problem. Hopefully I am not way off base here and this will help.
>>
>> Regards,
>> Neil
>>
|