MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   如何得到矩阵中特定区域的最大值的坐标 (https://www.labfans.com/bbs/showthread.php?t=7110)

请教 2009-03-26 14:31

如何得到矩阵中特定区域的最大值的坐标
 
我想得到一个矩阵中得到一特定区域的最大值的坐标,应该怎样操作?(例a=rang(256) 我想得到从110列到130列的最大值的坐标):redface:

yc620 2009-03-26 18:05

回复: 如何得到矩阵中特定区域的最大值的坐标
 
suppose a matrix 256*256
a=rand(256,256);
b=a(:,110:130);

c=max(max(b));

indice_maxvalue=find(b==c)


所有时间均为北京时间。现在的时间是 15:35

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.