# MAXIDX

## Purpose:

Finds the index of the maximum value of a series.

## Syntax:

MAXIDX(series)

(row, col) = MAXIDX(series)

 series - Optional. A series. Defaults to the current Window.

## Returns:

An integer, the index of the maximum.

(row, col) = MAXIDX(series) returns the row and column indices of the maximum.

## Example:

W2: gsin(100,.01)

maxidx(W2)

returns 26, the index of the location of the maximum.

## Example:

W2[maxidx(w2)] == max(W2) == 1.0

verifies that maxidx returns the index of the maximum.

## Example:

(x, y) = fxyvals(-2, 2, .1, -2, 2, .1);

z = sin(x*y)

mi = maxidx(z)

mi == 296

z[mi] == max(z) == 0.999942

## Example:

W1: ones(10);W0[3, 4] = 1.5;

(r, c) = maxidx(W1)

r == 3

c == 4

returns the row and column of the maximum of W1.

## Remarks:

For tabular or XYZ data, MAXIDX returns the index in "unraveled" form such that z[maxidx(z)] == max(z).

Use (r, c) = maxidx(series) to return the row and column indices of the maximum.

See MAXLOC to obtain the location of the maximum in terms of x and y units.

See COLMAXIDX to find the indices of the maximums for each column of a table.

COLMAX

COLMAXIDX

COLMINIDX

FIND

FMAX

FMIN

MAX

MAXLOC

MAXVAL

MIN

MINIDX