Skip to main content
1-Visitor
Aug 7, 2025 10:19 PM UTC
Solved

Maximum Value from Tables/Arrays

Hello, 

 

I am having difficulty applying the solution here: 

https://community.ptc.com/t5/Mathcad/Maximum-Value-from-Tables/td-p/999431

 

I have set-up a minimum example here with two arrays. When I try to get the maximum, an error is caused by the range variable i, "This value must be an integer". 

 

CB_9910591_0-1754605041821.png

I am using PTC Prime 9. 

 

Appreciate your help!

terryhendicott
21-Topaz II
Aug 7, 2025 10:43 PM UTC

Hi,Capture.JPG

 

4 replies

terryhendicott
21-Topaz II
Aug 7, 2025 10:43 PM UTC
1-Visitor
Aug 7, 2025 10:58 PM UTC

Thank you - definitely a subtle difference!

Translate
terryhendicott
21-Topaz II
Aug 7, 2025 11:23 PM UTC

Just for completeness and for others viewing this.

Prime 11 does away with the undocumented trick so you can use inline evaluation.

Capture.JPG

Translate
Werner_E
25-Diamond I
Aug 7, 2025 11:24 PM UTC

Personally I would prefer using a generic utility function (necessary because the built-in  "max" can't be vectorized)  instead of a range variable specific to the vectors in question.

Its also independent from the definition of ORIGIN.

Werner_E_0-1754609004382.png

Prime 9 sheet attached

Translate