# minND

Return the value and indices of the smallest value in an N-D array.

## Syntax

    min_val = minND(mat)
    [min_val, ind] = minND(mat)

## Description

`minND` returns the smallest value in the N-D array given by `mat`. The indices of the smallest value within the array can also be returned, where `ind = [ind_dim_1, ind_dim_2, ... , ind_dim_N]`. The indices can be used to directly address the smallest value, i.e., `min_val = mat(ind)`.

## Inputs

`mat` | input array

## Outputs

`min_val` | smallest value in `mat`
`ind` | array of indices corresponding to the location of the smallest value in `mat`