Dear Pierre,
The first output variable of evalc() contains the text that is otherwise
displayed but this is not going to help here when there is an error
within the call as you cannot access this variable.
It is possible to remove the text displayed by the batch system using:
cfg_message('none','destination','.*')
Have a look at the help text of cfg_message for further details.
This will not remove the text displayed by SPM itself though. You could
modify spm.m such that spm('*Banner',...) does not display anything but
the text from direct calls to fprintf() will still be displayed...
Otherwise what about redirecting stderr and stdout accordingly?
Best regards,
Guillaume.
On 03/07/17 10:25, Pierre Maurel wrote:
> Hi everyone,
>
> I would like to disable the text displayed by spm_jobman in the command window.
> For example when I try to launch a segmentation, I get this kind of messages:
>
> ------------------------------------------------------------------------
> Running job #20
> ------------------------------------------------------------------------
> Running 'Segment'
>
> SPM12: spm_preproc_run (v6365) 11:20:02 - 03/07/2017
> ========================================================================
>
> etc ...
>
> I tried to launch spm_jobman through evalc : evalc('spm_jobman(''run'',jobs)');
>
> It worked (I don't get the text messages anymore), but then I have the following problem: when spm_jobman fails, the sent error message (that I can catch through try/catch) is only the following:
>
> Error using MATLABbatch system
> Job execution failed. The full log of this run can be found in MATLAB command window, starting with the lines (look for the line showing the exact #job as displayed in this error message)
> ------------------
> Running job #21
> ------------------
>
> and I don't see the previous lines (which contain all the meaning full contents) and can not think of a way to get them ...
> Anyone has an idea ? :)
>
> bests,
>
> Pierre
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|