how can i separate those columns which have same number of rows (e.g. the highlighted ones with fixed 7 rows ) by excluding zeros?

4 ビュー (過去 30 日間)
how can i separate those columns from the data arrays which have same number of rows (e.g. the highlighted ones with fixed 7 rows ) by excluding zeros?

採用された回答

KSSV
KSSV 2021 年 6 月 3 日
編集済み: KSSV 2021 年 6 月 3 日
Let A be your matrix.
B = A(:,sum(A>0)==7) ; % pick the required columns
iwant = B(sum(B,2)>0,:) ; % remove the zeros if any in rows
I have assumed that all the numbers are positive in A.

その他の回答 (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