Create a fixed-point vector, and return the minimum value
from the vector.

x =
1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 11

Create a matrix of fixed-point values.

a =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 10

Find the smallest element of each row by finding the minimum
values along the second dimension.

x =
2
5
6
1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 10

The output, `x`

, is a column vector that contains
the smallest element of each row of `a`

.

Create a fixed-point matrix.

a =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 10

Find the smallest element of each column.

x =
4 2 3 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 10

The output, `x`

, is a row vector that contains
the smallest element of each column of `a`

.

Find the index of each of the minimum elements.

x =
4 2 3 1
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 10
y =
4 1 1 4

Create two fixed-point arrays of the same size.

Find the minimum elements from `a`

or `b`

.

m =
2.2998 3.2100 1.6001
0 2.2998 1.0000
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 11

`m`

contains the smallest elements from each
pair of corresponding elements in `a`

and `b`

.

Create a complex fixed-point vector, `a`

.

a =
1.0000 + 2.0000i 2.0000 + 1.0000i 3.0000 + 8.0000i 9.0000 + 1.0000i
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 3

The function finds the smallest element of a complex vector
by taking the element with the smallest magnitude.

ans =
2.2500 2.2500 8.5000 9.0000
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 3

In vector `a`

, the smallest elements,
at position `1`

and `2`

, have a
magnitude of `2.25`

. The `min`

function
returns the smallest element in output `x`

, and the
index of that element in output, `y`

.

x =
1.0000 + 2.0000i
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 3
y =
1

Although the elements at index 1 and 2 have the same magnitude,
the index of the first occurrence of that value is always returned.