What does this array operation do?
古いコメントを表示
I have two 2D square arrays of the same size, array1 and array 2. What does this operation do?
x = array1(array2)
採用された回答
その他の回答 (1 件)
KSSV
2022 年 2 月 8 日
0 投票
- If array2 is double and have fractions it will throw error.
- If array2 is logical i.e. it has 0 and 1's. It will give elements of array1 where array2 is 1.
- If array2 has all integers, it will give the respective elements. As array2 acts like indecing.
カテゴリ
ヘルプ センター および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!