Max value of each vector in a 3D hyperspectral data matrix

조회 수: 2 (최근 30일)
SImon Appeltans
SImon Appeltans 2019년 6월 18일
댓글: SImon Appeltans 2019년 6월 19일
I have 3D datacubes (hyperspectral images), and would like to come up with the position of the maximum value in each of the vectors along the z dimension.
So for every pixel with (x,y) coordinates, I want to know what the position is of the maximum value in the (x,y,:) vector, the max. of all z values).
is there a way to do this without running a for-loop with find?
Thanks!

채택된 답변

Honglei Chen
Honglei Chen 2019년 6월 18일
Let's say xc is your datacube, does
[z_max,z_ind] = max(xc,[],3)
satisfy your needs?
HTH

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Display Point Clouds에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by