I was trying to run a matlab script that uses some functions from spm through nipype interface. That worked fine when adding spm path in the matlab script. But I could not find a way to run a script in a similar way where a matlab script is run from a nipype interface using only standalone spm and MCR. If I built a custom interface similar to the one used for a simple command line, it also works (by just wrapping the _cmd = run_spm12.sh mcr script myscriptfile.m). But I wonder if there is a better way to run a .m script using compiled spm and mcr?
I can get the version printed when I use this example:
from nipype.interfaces import spm
matlab_cmd = ‘/path/to/run_spm8.sh /path/to/Compiler_Runtime/v713/ script’
But how can I load my .m file if I want a node in the workflow?
Can anyone show me a simple example where I can load my spm script?
Thanks a lot,