how to replace elements of a matrix position wise?????

2 ビュー (過去 30 日間)
suchismita
suchismita 2014 年 6 月 23 日
コメント済み: suchismita 2014 年 6 月 23 日
I have a matrix: A=[1 1 0 1; 1 0 1 1; 1 0 0 0; 0 1 0 1] now the elements of 3rd and 4th column i want to change every element as if its 1 than 0 or if its 0 than 1.
please please help me.....

採用された回答

Dishant Arora
Dishant Arora 2014 年 6 月 23 日
A(:,3:4)=~A(:,3:4)
  3 件のコメント
Dishant Arora
Dishant Arora 2014 年 6 月 23 日
A(:,[1,4]) = ~A(:,[1,4])
suchismita
suchismita 2014 年 6 月 23 日
thank you so much

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by