Skip to main content
1-Visitor
November 30, 2018
Solved

match function won't accept 3 arguments

  • November 30, 2018
  • 2 replies
  • 2363 views

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

Best answer by Werner_E

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.

 

2 replies

23-Emerald IV
November 30, 2018

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

Werner_E25-Diamond IAnswer
25-Diamond I
November 30, 2018

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.

 

AnjaliP1-VisitorAuthor
1-Visitor
November 30, 2018

Thank you, that fixed it!