Logical Indexing with matrix
조회 수: 2(최근 30일)
표시 이전 댓글
Assuming I have three matrices:
A = [1 0 ; 0 1]
B = [1 1 ; 1 1]
C = [3 4 ; 6 7]
I would like to perform the following operation
C = C ( A & B ) +1
That is: adding 1 to the elements of the matrix C that meet the condition, but it's not working.
Any ideaa of how to do it ?
댓글 수: 0
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!