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

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Mathcad - match function

Murarz
13-Aquamarine

Mathcad - match function

Hello everyone!

I have a problem with the following case:

 

I used the function Match (value, vector, "near") to find the row in which the vector has the wanted value.

 

But instead of finding a one value, I would like to create a function that would find a series of rows (Please see the attachment) But the function I created does not do the trick. I would appreciate any help

Murarz_0-1608631083318.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
LucMeekes
23-Emerald III
(To:Murarz)

It's not clear what you are after.

LucMeekes_0-1608638895630.pngLucMeekes_1-1608638917891.pngLucMeekes_2-1608638936709.png

Success!

Luc

View solution in original post

5 REPLIES 5
Murarz
13-Aquamarine
(To:Murarz)

Sorry, already solved it. Forgot to put "|Match |"

Murarz
13-Aquamarine
(To:Murarz)

But having defined the vector ff which considers the specific rows where values from vectror d match vector f. Is it possible to create a new vector c which would have rows as those defined in vector ff ?

 

In other words the first row of vector c : C_0 would be equal to C_ff0, where ff_0 is the first row of vector ff.,

C_1 would be equal to C_ff_1, C_2 equal to C_ff_2 and so on

LucMeekes
23-Emerald III
(To:Murarz)

It's not clear what you are after.

LucMeekes_0-1608638895630.pngLucMeekes_1-1608638917891.pngLucMeekes_2-1608638936709.png

Success!

Luc

Werner_E
24-Ruby V
(To:Murarz)

Here is an utility function which does the job using vectorization:

Werner_E_0-1608668254672.png

 

For more flexibility you may add the string modifier ("near" in this case) as third function argument of "MatchIt".

 

 

Murarz
13-Aquamarine
(To:Werner_E)

Thank you !!

Top Tags