# Indexing Maximum And Minimum Values In MatLab(Illustrated Expression)

In some cases you need to used maximum or minimum values of number series in mathematical calculations or data analyses in Matlab. Matlab provides very useful command to index the maximum and minimum values of vectors and matrices inside it. In this article we will show you how to index maximum and minimum values of matrices and vectors in Matlab.

### How To Index Maximum And Minimum Values Of Matrices And Vectors In Matlab?

We created ‘a’ and ‘b’ vector and matrix as shown by red an green arrows above to show you how to use max() and min() commands in Matlab. Also we calculated the maximum and minimum values of there matrix and vector as shown in green box above.

As you can see that the maximum and minimum values of vector ‘a’ is calculated respectively as shown by blue and yellow arrows.

Also maximum and minimum values are calculated matrix ‘b’ respectively as shown by orange and pink arrows above. As you can see that maximum and minimum value of each rows of matrix ‘b’ is calculated with max() and min() commands in Matlab.

Calculations of maximum and minimum values of vectors or matrices in Matlab is very basic as you can see.