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!