Delete a row if it contains a specific number of zeros
1 次查看(过去 30 天)
显示 更早的评论
Hi there,
I have a 1000x12 matrix and i want to eleminate all the rows, where the number of zeros is larger than 3.
Is there a simple trick to do this?
Best regards
0 个评论
回答(1 个)
Bhuvnesh Singh
2018-2-26
Try to run the attached code to delete the rows with zeros greater than 2.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!