フィルターのクリア

how to delete column with one number only

2 ビュー (過去 30 日間)
nadia nadi
nadia nadi 2016 年 4 月 21 日
コメント済み: nadia nadi 2016 年 4 月 25 日
Dear All,
I need to delete the columns with only one element from this matrix,
A =[1 1 1 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 1
0 0 0 0 1
0 0 1 0 0];
I used some command find with loop but it is not correct, is there any efficient idea.
thanks in advance.
Nadia,

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 4 月 21 日
編集済み: Azzi Abdelmalek 2016 年 4 月 21 日
A(:,sum(A)==1)=[]
  1 件のコメント
nadia nadi
nadia nadi 2016 年 4 月 25 日
Thank you very much Azzi.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by