Skip to main content
1-Visitor
Jun 11, 2014 3:44 AM UTC
Question

Evaluate values in two Matrices

How do I evaluate each element in two matrices of equal sizes (4 rows x 5 columns) and then return the maximum value into a new matrix? I want to evaluate each element with the corresponding element on the second matrix and produce a new matrix. Thank you in advance for your help with this!

16 replies

Werner_E
25-Diamond I
Jun 11, 2014 3:51 AM UTC

The attached file should help.

Translate
1-Visitor
Jun 11, 2014 5:49 AM UTC

Following on from Werner's example the code could be contained in a simple nested for loop program.

Translate
Werner_E
25-Diamond I
Jun 11, 2014 6:01 AM UTC

So if we go into programming, lets make it complete and create a utility function.

Translate
1-Visitor
Jun 11, 2014 6:03 AM UTC

Nicely done

Translate