Page 1 of 1

Maximum of a variable

Posted: Wed Jan 26, 2011 4:15 pm
by nikvyas
Hello all.

I realise that there is a GET DATA MAX that produces the maximum of a data range. However, I want to get a continuous account of the maximum of a variable. For instance, if a variable were to output the following sequence:

12,7,13,1,0,23,2,12,2,34

I would want another variable to give:

12,12,13,13,13,23,23,23,23,34

I can think of many long winded ways of doing it, but was wondering if there was a more elegant solution.

Thanks

Nik

Re: Maximum of a variable

Posted: Wed Jan 26, 2011 7:57 pm
by Administrator
try

running max of some var =
SAMPLE IF TRUE ( some var > running max of some var , some var , some var )

Re: Maximum of a variable

Posted: Thu Jan 27, 2011 1:01 pm
by nikvyas
Perfect! Thanks very much.

Nik