Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
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.
Solved! Go to Solution.
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.
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.
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.