フィルターのクリア

Logical Indexing with matrix

2 ビュー (過去 30 日間)
andrea
andrea 2021 年 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
  1 件のコメント
andrea
andrea 2021 年 6 月 13 日
Sure, It was trivial..

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by