Delete a row if it contains a specific number of zeros

5 次查看(过去 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

回答(1 个)

Bhuvnesh Singh
Bhuvnesh Singh 2018-2-26
Try to run the attached code to delete the rows with zeros greater than 2.

类别

Help CenterFile Exchange 中查找有关 Data Type Identification 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by