Motorola DSP Developer's Kit | ![]() ![]() |
Find the maximum value and index of one or two input vector(s).
MATLAB Syntax
N=mot566_max(X,Y) N=mot566_max(X,DIM) [N,I]=mot566_max(X,DIM)
Description
For vectors, mot566_max(X) is the largest element in X. For matrices, mot566_max(X) is a row vector containing the maximum element from each column.
[N,I] = mot566_max(X) returns the indices of the maximum values in vector I.
If the values along the first non-singleton dimension contain more than one maximal element, the index of the first one is returned.
mot566_max(X,Y) returns an array the same size as X and Y with the largest elements taken from X or Y. Either one can be a scalar.
[N,I] = mot566_max(X,DIM) operates along the dimension DIM. When complex, the magnitude mot566_max(mot566_abs(X)) is used.
Characteristics
In the workspace, if the input is:
X=[0.4807 + 0.0000i 0.0319 - 0.2921i 0.0000 + 0.6717i 0.5273 + 0.7144i] Y=[-.1245 + 0.2242i 0.2623 - 0.7241i 0.7800 + 0.1121i -0.2324 ]
N= mot566_max(X,Y) N= 0.4807 0.2623 - 0.7241i 0.7800 + 0.1121i 0.5273 + 0.7144i
Arguments
X,Y
Vector (or matrix) with elements normalized in the range [-1,1] (for complex elements, both real and imaginary parts should comply with this limit).
See Also
mot566_min
![]() | mot566_log10 | mot566_mean | ![]() |