


minxy: Minimum of a matrix
Usage: [minValue, minIndex] = minxy(A)
minValue: the minimum of the matrix A
minIndex: the 2D index of minValue in A
For example:
[minValue, minIndex]=minXy(magic(5))

0001 function [minValue, minIndex] = minXy(mat) 0002 %minxy: Minimum of a matrix 0003 % Usage: [minValue, minIndex] = minxy(A) 0004 % minValue: the minimum of the matrix A 0005 % minIndex: the 2D index of minValue in A 0006 % 0007 % For example: 0008 % [minValue, minIndex]=minXy(magic(5)) 0009 0010 % Roger Jang, 20010219, 20071009 0011 0012 [colMin, colMinIndex] = min(mat); 0013 [minValue, tmp] = min(colMin); 0014 minIndex = [colMinIndex(tmp) tmp];