"Algebraic" IF Statement Evaluation
On 2009-05-19, Jim Thompson wrote:
I need to evaluate...
IF(t,1,0) (If t is true, output 1, if t is false, output 0 (numeric),
t may be something like V11 = 7, for example)
BUT I have no IF statement handling capability at this level of a
simulation.
I do have algebraic capability.
Is there some cute way to do this algebraically?
...Jim Thompson
are there any operators or functions that can give a different
mumeric result depending on the truth of the input.
many systems have false as 0 and true as 1 (or less common -1)
else maybe something like (sgn( sgn(V11-7) *2 +1 ) + 1 ) /2
|