min
Minimum element of an array if there is a single array argument; the minimum value from all values in the arguments
Syntax
[y, id] = min ( x1,x2,... )
[y, id] = x1.min ( x2,... )
Inputs
| Argument | Type | Description | Unit |
|---|---|---|---|
x1 | scalar or vector | ... | ... |
x2 | scalar or vector | - | - |
... | ... | - | - |
Outputs / Return Value
y:yis the minimum element.id:idis the index of the minimum element found first.
Examples
a=[8 2 4 6]; min(a) or a.min → 2
b=[3 0 -1]; min(a,b) or a.min(b) → -1
Multiple output [a,b]=(1:10:120).matrix(3).max() returns
a=
1
41
81
b=
1
1
1
See Also
Review Status
- Legacy parameter naming does not exactly match current engine metadata and should be reviewed manually.