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

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

Comparing data from two arrays

ptc-3820221
1-Newbie

Comparing data from two arrays

I am looking for the easiest way to compare the data from two arrays. I have two output arrays, each consisting of one column and several rows and I would like to compare the two to find the max value for each row. The final result should be another array with one column and the same number of rows. I've been trying if/then statements and the 'max' function but am unsure how to vectorize these equations and get them to compare the data row by row.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

The bad news are that max() can't be vectorized.

The good news are that you can write your own max.. routine based on the built-in max and this routine can be vectorized.

For future questions, please state which version of Mathcad the question relates to and attach a worksheet wherever possible.

25.03.png

View solution in original post

3 REPLIES 3

The bad news are that max() can't be vectorized.

The good news are that you can write your own max.. routine based on the built-in max and this routine can be vectorized.

For future questions, please state which version of Mathcad the question relates to and attach a worksheet wherever possible.

25.03.png

Thanks! I'll give this a try. I'm working on an old worksheet in mathcad 15, but I also have mathcad prime 3.0 installed and could convert it if it would help.

Mathcad 15 is OK. Its the better and more powerful version anyway.

So for future questions turn in the sheet in whatever version you are working on.

Top Tags