Re: Question about the plugin Calculator Plus
Posted by Gabriel Landini on Apr 18, 2010; 8:22am
URL: http://imagej.273.s1.nabble.com/Question-about-the-plugin-Calculator-Plus-tp3688565p3688568.html
The problem in the code posted is that the variable names should be outside
the quotations:
Instead of:
> > run("Calculator Plus", "i1=X i2=Y operation=[Subtract: i2 = (i1-i2) x k1
> > + k2] k1=1 k2=0 create");
it should be something like:
run("Calculator Plus", "i1="+X+" i2="+Y+" operation=[Subtract: i2 = (i1-i2) x
k1 + k2] k1=1 k2=0 create");
or add an ampersand prefix to get the variables' values in the quoted string:
run("Calculator Plus", "i1=&X i2=&Y operation=[Subtract: i2 = (i1-i2) x k1 +
k2] k1=1 k2=0 create");
all in one line, obviously.
Cheers,
G.