Deleting rows of an array
古いコメントを表示
Hi all,
I have an array 48X365, where some of the columns are zero!
Is there any way to delete them and get an array without these columns?
The thing is that the columns appear randomly
thanks!
採用された回答
その他の回答 (1 件)
KSSV
2017 年 4 月 4 日
Let data be your matrix where few columns are zeroes. Use:
data(:, sum(data,1)==0) = [] ; % removes columns with zeroes
カテゴリ
ヘルプ センター および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!