matrix
古いコメントを表示
if i want to find the index of certain value in 2D matrix, how can I find that? e.g: I have a 300x300 matrix. There is a value 90096 in that matriz. I want to find its index. Please show me the code.
採用された回答
その他の回答 (2 件)
Jim
2011 年 12 月 20 日
0 投票
you can use find command to know the index of values in matrix
C.J. Harris
2011 年 12 月 20 日
Using find with two return parameters might make it easier.
[row, col] = find(matrix == 90096);
3 件のコメント
Khawaja Asim
2011 年 12 月 20 日
Walter Roberson
2011 年 12 月 20 日
Probably the value in the matrix was not _exactly_ 90096
http://matlab.wikia.com/wiki/FAQ#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F
Khawaja Asim
2011 年 12 月 20 日
カテゴリ
ヘルプ センター および File Exchange で Operating on Diagonal Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!