File Exchange Pick of the Week

May 12th, 2004

Minimum of an entire matrix

Duane wrote the book on MATLAB, he also wrote this pair of functions to find the max and min of an entire matrix rather than using the standard MATLAB method of returning the maximum of each column.

This is a great set of functions that will save you from typing

a = magic(5);
min(a(:))

and replace it with

a = magic(5);
minn(a)

It is cleaner looking, and saves you two keystrokes (they add up you know!). The code is well written and is robust because of error checking.

Comments are closed.


MathWorks

Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.