alter_element with an RPN equation and -macro
Posted: 19 Apr 2012, 18:55
Hi,
I am attempting to use alter_element to modify several components of an EMATRIX based on a -macro entered at the command line. Each of the components that I am changing is to be replaced with an equation, usually a function of the variable specified with the -macro command. However, it appears that only the first term in the equation is being used in the transfer matrix.
For example, if I use:
&alter_elements
name = TDC_*,
item = R12
value = "0.07687 2.0 /"
&end
The R12 element will then become (by inspecting the .matext file)
R12 = 0.07687 M
i.e. ignoring the division by two. Likewise,
&alter_elements
name = TDC_*,
item = R65
value ="$TDCSTRENGTH $TDCSTRENGTH * 0.07687 * 8 /"
&end
with -macro=TDCSTRENGTH=1.5 gives
R65 = 1.5 1/M
What am I doing wrong?
Thanks,
Chris
I am attempting to use alter_element to modify several components of an EMATRIX based on a -macro entered at the command line. Each of the components that I am changing is to be replaced with an equation, usually a function of the variable specified with the -macro command. However, it appears that only the first term in the equation is being used in the transfer matrix.
For example, if I use:
&alter_elements
name = TDC_*,
item = R12
value = "0.07687 2.0 /"
&end
The R12 element will then become (by inspecting the .matext file)
R12 = 0.07687 M
i.e. ignoring the division by two. Likewise,
&alter_elements
name = TDC_*,
item = R65
value ="$TDCSTRENGTH $TDCSTRENGTH * 0.07687 * 8 /"
&end
with -macro=TDCSTRENGTH=1.5 gives
R65 = 1.5 1/M
What am I doing wrong?
Thanks,
Chris