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

Community Tip - Need help navigating or using the PTC Community? Contact the community team. X

match function won't accept 3 arguments

AnjaliP
2-Guest

match function won't accept 3 arguments

Hello all

 

I'm trying to get the indices of values in a vector that are less than or equal to a threshold value. From the documentation, it seems that I should use

match(threshold, vector, "leq")

but this gives the error "This function accepts at most 2 arguments but is applied to 3". The relevant code snippet is below.

 

I've looked at the docs and forums but can't find any code examples using the third argument as specified in the docs. I've tried "leq" with and without the quotes.

 

I would really appreciate any help! What am I doing wrong?

 

matchError.PNG

1 ACCEPTED SOLUTION

Accepted Solutions

In MathCad 15 you have to use "Match" instead of "match" - note the capital "M".

"match" is part of the normal distribution but "Match" is part of the "data analysis extension pack" (which as far as I am aware part of most Mathcad licenses apart of some edu licenses).

In Prime there is no difference between "match" and "Match" and you may use each one with either 2 or 3 arguments.

 

View solution in original post

3 REPLIES 3
LucMeekes
23-Emerald III
(To:AnjaliP)

The function match accepts 3 arguments in Prime.

From your pictures I deduct that you're using Mathcad 15, that's not Prime. It is very well possible that this is an improvement of Prime over Mathcad 15.

 

Success!

Luc

In MathCad 15 you have to use "Match" instead of "match" - note the capital "M".

"match" is part of the normal distribution but "Match" is part of the "data analysis extension pack" (which as far as I am aware part of most Mathcad licenses apart of some edu licenses).

In Prime there is no difference between "match" and "Match" and you may use each one with either 2 or 3 arguments.

 

Thank you, that fixed it!

Top Tags