Did not know gencode(matlabbatch): https://fr.mathworks.com/matlabcentral/fileexchange/24447-generate-m-file-code-for-any-matlab-variable
Looks useful. Thanks!
On 05/11/2018 11:35, Volkmar Glauche wrote:
> Hi Lewis,
> I assume you are using spm_jobman('run', ...) to populate and run your job. This call has two optional output arguments, the collected outputs from each batch module and the job actually run. So, [~, matlabbatch] = spm_jobman('run', ...) will give you the job populated with the actually used data. Note that these data will replace the dependencies from your template. You can then save this matlabbatch variable to a .mat file or use gencode(matlabbatch) to produce MATLAB code for the job variable.
> Hope this helps,
> Volkmar
|