>> help max

M = max(X) is the largest element in the vector X. If X is a matrix, M

is a row vector containing the maximum element from each column. For

N-D arrays, max(X) operates along the first non-singleton dimension.

[M,I] = max(X) also returns the indices into operating dimension

corresponding to the maximum values. If X contains more than one

element with the maximum value, then the index of the first one

is returned.

In your case, Gam is your row variable, and w is your column variable, so:

[Fvpa_max_columns, index_columns] = max(Fvpa);

w_max = w(index_columns)

[Fvpa_max_rows, index_rows] = max(Fvpa, [], 1);

Gam_max = Gam(index_rows)

## 0 Comments

Sign in to comment.