Hi,
Looking for functions that select the minimum or maximum of two
variables. (not Highest function which selects highest of a series).
Maximum/Minimum Functions
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Maximum/Minimum Functions
MaxlistHi,
Looking for functions that select the minimum or maximum of two
variables. (not Highest function which selects highest of a series).
Minlist
If you're looking for a max between variables then you can create a new function, call it Max as returning numeric and simple function storage. Then paste this in the code section:
and compile ... you can then use the function like this:
Code: Select all
inputs: v1(numericsimple), v2(numericsimple);
Max = iff(v1>=v2,v1,v2);
Code: Select all
variables: mv1(3), mv2(2);
value1 = Max(mv1,mv2);
print("value1: "+ NumToStr(value1,0));