Skip to main content
1-Visitor
June 9, 2022
Solved

Match function to return variable name

  • June 9, 2022
  • 2 replies
  • 2645 views

Hello, 


I'm not that experience with Mathcad, I do with excel, there the index match function is quite handy, something similar I would like to use in Math

I would like a lookup function in a matrix, to return as output from the matrix, not the value, but the name:

Casper123_0-1654700037413.png

 

I'm not sure if it's even possible, have searched throughout the internet without results..

 

Thanks for helping!

Best answer by Werner_E

Simplification.

We can get rid of the Index variable, but inline evaluation still is necessary because "max" cannot be evaluated symbolically if units are used.

Werner_E_0-1654875214576.png

 

 

2 replies

21-Topaz II
June 9, 2022

Hi,

Does this do:

Capture.JPG

23-Emerald IV
June 9, 2022

Like this... (in Mathcad 2001)

LucMeekes_2-1654794434128.png

Unfortunately this functionality was lost in later versions of Mathcad, and Prime does not support it either,.

 

Success!
Luc

25-Diamond I
June 9, 2022

Your method works if we use an intermediate variable for the index which is inline evaluated numerically to stop the symbolics from trying to recalculate it.

Werner_E_0-1654809393923.png

 

Werner_E25-Diamond IAnswer
25-Diamond I
June 10, 2022

Simplification.

We can get rid of the Index variable, but inline evaluation still is necessary because "max" cannot be evaluated symbolically if units are used.

Werner_E_0-1654875214576.png