I'm writing a batch using the Batch Editor in SPM8 using matlab. Now I want to include a simple matlab function that I have written myself. I make sure this function is saved in the path of SPM. As input variable the function uses a file from a previous step in the batch, and when I specify the function to be called, it says "Input could not be evaluated".
So now I'm trying to make another easy function work in the SPM batch, for example "sqrt". I put the "Evaluated Input" to 25, the "Type of output variable" to real number, and the "Function to be called" to sqrt. Again there is an error message saying "Input could not be evaluated".
What am I doing wrong here?
Enter the function in single quotes as follows: 'sqrt'
I just tried it and it worked.
Your batchfile should end up looking like this:
matlabbatch{1}.cfg_basicio.run_ops.call_matlab.inputs{1}.evaluated = 25;
matlabbatch{1}.cfg_basicio.run_ops.call_matlab.outputs{1}.strtype.r = true;
matlabbatch{1}.cfg_basicio.run_ops.call_matlab.fun = 'sqrt';