# how to find highest intesity value point from a given matrix

4 views (last 30 days)
yagnesh on 28 Mar 2011
suppose there is a matrix like below
122.9672 121.5649 120.2468 118.7600 117.2035 115.6017 113.8413 111.7508 122.9196 121.5226 120.1134 118.6164 117.0462 115.4400 113.6867 111.6543 122.6745 121.3784 119.9041 118.3545 116.9730 115.3530 113.5398 111.5243 122.4921 121.0867 119.5630 118.3065 116.9100 115.2058 113.3887 111.3885 122.1304 120.6768 119.5626 118.2678 116.7932 115.0587 113.2190 111.0841 121.9399 120.7792 119.4907 118.0365 116.5525 114.8477 113.0947 110.9844 121.9365 120.7018 119.2644 117.7673 116.2963 114.7126 112.9527 110.8958 121.7612 120.4922 118.9793 117.4990 116.0592 114.3961 112.6046 110.6259 121.3596 120.0059 118.4950 117.0195 115.6654 114.0556 112.5314 110.5393 120.9674 119.6306 118.1054 116.6869 115.3388
can anyone help me how to find the highest intensity value point from the above matrix

Paulo Silva on 28 Mar 2011
[value, index]=max(max(a))
Jan on 29 Mar 2011
But then [index] is the column index only and the row-index is lost.
"[value, index] = max(a(:))" would reply at least the linear index.

Jan on 28 Mar 2011
The most accurate answer to your question is: "122.9672" at (1,1). But your "matrix" has no rectangular shape.
And explicitely again:
A = rand(10, 10); % Example data.
[rowValue, rowIndex] = max(A, 1);
[Value, col] = max(rowValue);
row = rowIndex(col);
Or:
[maxNum, maxIndex] = max(data(:));
[row, col] = ind2sub(size(data), maxIndex);
yagnesh on 31 Mar 2011
yes i know its shape is not perfect..
it was just an example for being consideration
anyways thanks a lot man

### Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by