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에서 Matrices and Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!