cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Translate the entire conversation x

Maximum Value from Tables/Arrays

CB_9910591
2-Explorer

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!

ACCEPTED SOLUTION

Accepted Solutions

4 REPLIES 4

Hi,Capture.JPG

 

Thank you - definitely a subtle difference!

Just for completeness and for others viewing this.

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

Capture.JPG

Werner_E
25-Diamond I
(To:CB_9910591)

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

Announcements

Top Tags