フィルターのクリア

How to delete empty lines in a table

9 ビュー (過去 30 日間)
012786534
012786534 2016 年 7 月 3 日
コメント済み: 012786534 2016 年 7 月 3 日
Hello all, I have an easy question for you. How would you delete all empty lines in a table? Thank you
  1 件のコメント
Image Analyst
Image Analyst 2016 年 7 月 3 日
Start with the last row and work up using a for loop. Are all the columns of the same data type, like double? Or is there a mix of data types? Can you supply a sample table?

サインインしてコメントする。

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 7 月 3 日
If A is your table
idx=all(cellfun(@isempty,A{:,:}),2)
A(idx,:)=[]
  1 件のコメント
012786534
012786534 2016 年 7 月 3 日
Thank you for another great answer!

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by