Problem: I want to create a variable which is has one value (like 1 or 0) where the value of a variable exceeds some limit and a different value where it does not exceed the limit. Is there a way I can do this within Tecplot?
Solution: Yes. There are two ways to go about this. 1) You can write a macro. The Tecplot macro language has the IF THEN logic you will need and it will allow you to assign any values you wish to the variable that holds the result of the comparison. 2) You can also do this under Data/Alter/Specify Equations by using the MIN or MAX function in conjunction with the SIGN function. Ex: Suppose v10 was the variable you wanted to test and that you want to compare it to the value 20. Then this equation: {result} = SIGN(MIN(v10 20) – 20)will return +1 if the MIN(v10 20) is 20 – if (v10 >= 20) – and will return -1 if the MIN(v10 20) is the value of v10 – if (v10 < 20).




