Home > utility > minxy.m

minxy

PURPOSE ^

minxy: Minimum of a matrix

SYNOPSIS ^

function [minValue, minIndex] = minXy(mat)

DESCRIPTION ^

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))

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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];

Generated on Tue 01-Jun-2010 09:50:34 by m2html © 2003