Hi Franziska,
The error message you are facing with the spm_jobman command in your preprocessing script is related to unresolved dependencies or incomplete module inputs. This error typically occurs when the script is unable to find all the necessary components to execute the job correctly.Verify that the matlabbatch variable, which contains the job specification, is correctly defined. Ensure that all required fields are filled with the appropriate values. You can inspect the matlabbatch variable to see if any fields are missing or incorrectly specified. To Resolve Dependencies, because it indicates that some modules or functions required by the job are missing or not properly linked. Review the job structure and make sure that all dependencies are correctly specified and accessible.Here is an example of how you can modify the code to potentially resolve the issue:
% Assuming matlabbatch is correctly defined before this point
try
spm_jobman('run', matlabbatch);
catch ME
disp(ME.message);
rethrow(ME);
end
By encapsulating the spm_jobman call in a try-catch block, you can capture any errors that occur during job execution and display the error message for further investigation. If the error persists after checking the job structure and resolving dependencies, consider debugging the code step by step. You can use breakpoints, display variables, and inspect the execution flow to identify the root cause of the issue.