How to delete empty lines in a table

Hello all, I have an easy question for you. How would you delete all empty lines in a table? Thank you

1 Kommentar

Image Analyst
Image Analyst am 3 Jul. 2016
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?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Azzi Abdelmalek
Azzi Abdelmalek am 3 Jul. 2016

2 Stimmen

If A is your table
idx=all(cellfun(@isempty,A{:,:}),2)
A(idx,:)=[]

Kategorien

Tags

Gefragt:

am 3 Jul. 2016

Kommentiert:

am 3 Jul. 2016

Community Treasure Hunt

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

Start Hunting!

Translated by