How to delete empty lines in a table

9 visualizaciones (últimos 30 días)
012786534
012786534 el 3 de Jul. de 2016
Comentada: 012786534 el 3 de Jul. de 2016
Hello all, I have an easy question for you. How would you delete all empty lines in a table? Thank you
  1 comentario
Image Analyst
Image Analyst el 3 de Jul. de 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?

Iniciar sesión para comentar.

Respuestas (1)

Azzi Abdelmalek
Azzi Abdelmalek el 3 de Jul. de 2016
If A is your table
idx=all(cellfun(@isempty,A{:,:}),2)
A(idx,:)=[]

Categorías

Más información sobre Tables en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by