Page 1 of 1

Maximum/Minimum Functions

Posted: 08 Jun 2010
by black phil
Hi,

Looking for functions that select the minimum or maximum of two
variables. (not Highest function which selects highest of a series).

:)

Re: Maximum/Minimum Functions

Posted: 08 Jun 2010
by TJ
Hi,

Looking for functions that select the minimum or maximum of two
variables. (not Highest function which selects highest of a series).

:)
Maxlist

Minlist

Posted: 16 Jun 2010
by k-hen
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:

Code: Select all

inputs: v1(numericsimple), v2(numericsimple);
Max = iff(v1>=v2,v1,v2);
and compile ... you can then use the function like this:

Code: Select all

variables: mv1(3), mv2(2);

value1 = Max(mv1,mv2);
print("value1: "+ NumToStr(value1,0));