MATLAB Answers

Logical Indexing with matrix

1 次查看(过去 30 天)
andrea
andrea2021-6-13
评论: andrea ,2021-6-13
Helllo,
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 ?

采纳的回答

madhan ravi
madhan ravi 2021-6-13
C( A & B ) = C( A & B ) + 1

更多回答(0 个)

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by