MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   资料存档 (https://www.labfans.com/bbs/forumdisplay.php?f=72)
-   -   Matlab查找不适用于高维数组? (https://www.labfans.com/bbs/showthread.php?t=23617)

poster 2019-12-10 20:42

Matlab查找不适用于高维数组?
 
说A = rand(2,2,2); [a,b,c] =查找(A == A(1,2,2))

我得到a = 1 b = 4 c = 1

什么?



[B]回答:[/B]

尝试这个:

[a,b,c] = ind2sub(size(A), find(A==A(1,2,2))) 资料来源: [URL="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/find.html"]find[/URL] , [URL="http://www.mathworks.com/access/helpdesk/help/techdoc/ref/ind2sub.html"]ind2sub[/URL]



[url=https://stackoverflow.com/questions/3159715]更多&回答...[/url]


所有时间均为北京时间。现在的时间是 01:08

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