max

Parent Previous Next

max

[y, id] = max ( x1,x2,... )
[y, id] = x1.max ( x2,... )

Maximum element of an array if there is a single array argument; the maximum value from all values in the arguments

arg

type

Description

Unit or Value scale

x1

SCAL or VCT



x2

SCAL or VCT



...

...

...


Outputs

  • y is the maximum element.
  • id is the index of the maximum element found first.

Notes

  • Row-wise operation

Examples

  • a=[8 2 4 6]; max(a) or a.max → 8
  • b=[3 9 -1]; max(a,b) or a.max(b) → 9
  • Multiple output [a,b]=(1:10:120).matrix(3).max() returns
  • a=
    31
    71
    111

    b=
    4
    4
    4

See Also

min

Created with the Personal Edition of HelpNDoc: iPhone web sites made easy