Skip to main content
1-Visitor
June 11, 2014
Question

Evaluate values in two Matrices

  • June 11, 2014
  • 2 replies
  • 6214 views

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!

2 replies

25-Diamond I
June 11, 2014

The attached file should help.

1-Visitor
June 11, 2014

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

25-Diamond I
June 11, 2014

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

1-Visitor
June 11, 2014

Nicely done