Returns a column vector containing the smallest element in each column of a matrix.


y = minc(x)
Parameters:x (NxK matrix or sparse matrix) – data
Returns:y (Kx1 matrix) – contains the smallest element in each column of x.


// Create random matrix
x = rndn(4, 2);

// Find minimum in each column
y = minc(x);

If x is equal to:

-1.9950  -1.3477
-0.4031  -1.9137
 0.8136  -2.3155
-0.9947   1.4061

then y will equal:



If x is complex, minc() uses the complex modulus (abs(x)) to determine the smallest elements.

To find the minimum element in each row, transpose the matrix before applying the minc() function.

To find the minimum value in the whole matrix, nest two calls to minc():

y = minc(minc(x));

See also

Functions maxc(), minindc(), maxindc()