# Passing a variable to image math command

I am trying to scale images using the maths command within a macro but without success in passing the variables. With hard coded numbers (the // section below) the maths commands work. But I do not get consistent results when using a variable within the run command. In fact the code below using variables doesn’t seem to do anything, even though just having individual math commands does seem to work. I am using 32 bit images. Any suggestions as to solution much appreciated.

``````Image_mean = getNumber("Image mean",60.0);
Image_stdev = getNumber("Image stdev",12.0);
Nscale=25.0;

run("Subtract...", Image_mean);
run("Multiply...", Nscale);
run("Divide...", Image_stdev);

//run("Subtract...", "value=60");
//run("Multiply...", "value=25");
//run("Divide...", "value=12");
``````"value=" + Image_mean