This project has moved. For the latest updates, please go here.

Find Min and Max element in matrix?

Apr 7, 2014 at 11:01 PM
Hi,

I want to find the max value and minimum value within a matrix. Is there any way to do that without for loops?

Thanks
Coordinator
Apr 8, 2014 at 8:45 AM
I was under the impression we had added Minimum/Maximum routines a while back, but apparently that was only for vectors. You can use Enumerate however, which is fairly efficient in v3:
m.Enumerate().Max()
m.Enumerate().Min()
Thanks,
Christoph
Marked as answer by cdrnet on 5/2/2014 at 10:35 AM
Coordinator
May 2, 2014 at 6:35 PM
See also Issue 160.