Using Imagesc() then solving for the locations of the max values

조회 수: 4 (최근 30일)
Articat
Articat 2019년 1월 9일
댓글: Articat 2019년 1월 9일
Hi,
So I am trying to go from an imagesc() plot to finding the coordinates of the maximum values of the coordinates in the plot. I attached my code and the imagesc() plot I am trying to find the maximum values from. If this doesn't make sense feel free to ask me questions!
Thanks!
imagesc() plot.jpg
Matlab Code:
x = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10];
y = [1; 2; 3; 4; 5; 6; 7; 8; 9; 10];
z = [40 2 3 4;
40 40 6 8;
3 40 40 12;
4 40 40 16;
5 40 40 20;
6 40 40 24;
7 14 40 28;
8 16 40 40;
9 18 40 40;
10 20 30 40];
N = imagesc(x, y, z);
colormap jet
colorbar
L = max(z,[],2);
[I,J] = find(z==max(z(:)))
  댓글 수: 1
Articat
Articat 2019년 1월 9일
For example, for exery location there is a red box (a maximum of 40), a x and y point would correspond to it.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Orange에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by