I'm having a simple problem with spm_imcalc / spm_imcalc_ui.  I need to read in a variable to be used in the imcalc equation.  

The basic idea is to do this:


in a batch script, where 'thresh1' is a value previously calculated for each subject.  The function works if I use a simple number, e.g. '1', in place of the variable.

However, adapting the command to read in the extra variable, for example:


has not worked.  I think I must be missing something about the syntax.  (Judging by the lack of questions posted to the board on imcalc and variables, it's something obvious, or it's a function that SPM people never use.)

Thank you for any help!

Best regards,


Dept. of Psychology
Columbia University
New York, NY