atImax

Syntax

atImax(location, value)

Arguments

location and value are vectors/matrices of the same dimensions.

Details

Find the position of the element with the largest value in parameter location, and return the value of the element in the same position in parameter value. If there are multiple identical maximums in location, return the position of the first maximum.

If location and value are matrices, conduct the aforementioned calculation with each column of location and the corresponding column of value.

atImax(location, value) = value[imax(location)].

Examples

$ atImax(3 5 1 2, 9 7 5 3)
7

Related functions: imax, atImin