min( ) command or function gives the smallest or minimum element of a vector or matrix or array, after reading this MATLAB min topic, you will know the theory and examples.
Syntax:
min(n)
- n can be any vector or matrix.
Example: To find the smallest element of the vector.
Output:
n =
1 2 2 100 5 78
ans =
100
Example: To find the smallest element of each column of the matrix.
Output:
n =
1 2 3
1 2 23
4 5 21
ans =
4 5 23
Explanation:
- 1, 2 and 3 is the minimum element of the first, second and third column of the matrix respectively.
Related Topics
MATLAB matrix inverseinv( ) command or function gives the inverse of a matrix, after reading this MATLAB…
MATLAB diagonal matrixdiag() command or function gives diagonal elements or creates a diagonal matrix, after reading this…
MATLAB linspacelinspace( ) command or function creates a row vector with elements that are linearly (equally)…
MATLAB titletitle() command puts the title on the plot, after reading this MATLAB title topic, you will…
MATLAB onesThis command creates an array of all ones, after reading this MATLAB ones topic, you…