Get max. value from a range
Get max. value from a range
(OP)
Who knows?
I want to get the maximum value out of a range of values.
The range is the result of a function.
Simplified, the function looks like this. I put 'X' in a range and therefore the result 'A(x)' is also a range.
X = 0, 1 .. X.max
A(X) = B(X)/C
I tried to get a maximum like this:
max (A(0), A(1) .. A(X.max))
Mathcad gives me the result '0'
The thing is, when I try this with 'min', I get the correct minimum result.
I want to get the maximum value out of a range of values.
The range is the result of a function.
Simplified, the function looks like this. I put 'X' in a range and therefore the result 'A(x)' is also a range.
X = 0, 1 .. X.max
A(X) = B(X)/C
I tried to get a maximum like this:
max (A(0), A(1) .. A(X.max))
Mathcad gives me the result '0'
The thing is, when I try this with 'min', I get the correct minimum result.





RE: Get max. value from a range
TTFN
FAQ731-376: Eng-Tips.com Forum Policies
RE: Get max. value from a range
You need to define an array, like AX
A[X:=X/2 or something like that. Then you can find max(A)
I suggest you go to Help|Tutorials|Features In-Depth|Arrays and Range Variables.
RE: Get max. value from a range
I put all the results inside an array and now mathcad finds my max en min value.