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

Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X

Translate the entire conversation x

Help with building a logic based on array of texts

fahmed-2
13-Aquamarine

Help with building a logic based on array of texts

Hello,

 

I have a Mathcad sheet which I am working on to find the factor of safety for block walls. The sheet will calculate and spit out a text "Stable", "Unstable" based on a comparison , which I have provided in the logic. What I request to have is a Mathcad prompt, that checks the array FS_OT to see how many "UNstable" are there. If so, it should send out a message saying "UnStable" and tell me at which level of the layer of blocks are unstable. Please help on this as I am not that pro level. My Mathcad version is Prime 10. This is not an error issue so no screenshots were provided.

 

Thank you very much

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(To:fahmed-2)

Here are my 2 cents worth.

 

I would only calculate the values:

Werner_E_0-1751593653396.png

And, although not absolutely necessary, I would define auxiliary functions

Werner_E_3-1751596955804.png

and use them to make the desired stability outputs based on the data:

Werner_E_2-1751593857904.png

 

Example using different data:

Werner_E_5-1751597076925.png

 

Prime 10 sheet attached

 

View solution in original post

2 REPLIES 2

Hi,

Function you are looking for is match().

Match returns an error if there are no matches so no need a test before its use.

Capture.JPG

Werner_E
25-Diamond I
(To:fahmed-2)

Here are my 2 cents worth.

 

I would only calculate the values:

Werner_E_0-1751593653396.png

And, although not absolutely necessary, I would define auxiliary functions

Werner_E_3-1751596955804.png

and use them to make the desired stability outputs based on the data:

Werner_E_2-1751593857904.png

 

Example using different data:

Werner_E_5-1751597076925.png

 

Prime 10 sheet attached

 

Announcements


Top Tags