Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mathcad version of iserror in Excel

Status
Not open for further replies.

mathcadboy

Civil/Environmental
Sep 14, 2009
38
I wonder how do I do like an iserror function of excel in mathcad.

for example, I am going to match a number to an array that doesnt have a match to that number. Mathcad only gives out an error message saying that "no matching values found". how do I make mathcad do something else if no values are matching instead of just giving out that error message.

Thanks in advance!
 
Replies continue below

Recommended for you

I suppose you could use Match(z,A,"not"). The result would be an array with all the indeces where the value was not found. If you compare that to the bounds of the original array and the values are the same, then it was not found.
 
I think it could work. you could compare the number of rows of the original matrix to the one resulting in Match(z,A,"not"). Thanks!
 
That's fine if you only have a single row, otherwise you'll have to use something like:
err:=if(rows(M)*cols)M)-rows(index),"there","not there")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor