Skip to main content
1-Visitor
August 7, 2025
Solved

Maximum Value from Tables/Arrays

  • August 7, 2025
  • 2 replies
  • 518 views

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!

Best answer by terryhendicott

Hi,Capture.JPG

 

2 replies

21-Topaz II
August 7, 2025
1-Visitor
August 7, 2025

Thank you - definitely a subtle difference!

21-Topaz II
August 7, 2025

Just for completeness and for others viewing this.

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

Capture.JPG

25-Diamond I
August 7, 2025

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