Delete a row if it contains a specific number of zeros

6 ビュー (過去 30 日間)
Arda Büyükasik
Arda Büyükasik 2018 年 2 月 21 日
回答済み: Bhuvnesh Singh 2018 年 2 月 26 日
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 Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by