remove rows with all zeros
252 次查看(过去 30 天)
显示 更早的评论
I have
a =
1 2 3
0 0 0
2 1 0
4 5 0
0 0 0
2 0 1
I need
b=
1 2 3
2 1 0
4 5 0
2 0 1
0 个评论
采纳的回答
Walter Roberson
2012-6-6
b = a(any(a,2),:);
更多回答(1 个)
Geoff
2012-6-6
Search facility on Answers shows this question is asked a lot... Here's one of the more recent.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!