Effacer les filtres
Effacer les filtres

How to delete empty lines in a table

9 vues (au cours des 30 derniers jours)
012786534
012786534 le 3 Juil 2016
Commenté : 012786534 le 3 Juil 2016
Hello all, I have an easy question for you. How would you delete all empty lines in a table? Thank you
  1 commentaire
Image Analyst
Image Analyst le 3 Juil 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?

Connectez-vous pour commenter.

Réponses (1)

Azzi Abdelmalek
Azzi Abdelmalek le 3 Juil 2016
If A is your table
idx=all(cellfun(@isempty,A{:,:}),2)
A(idx,:)=[]
  1 commentaire
012786534
012786534 le 3 Juil 2016
Thank you for another great answer!

Connectez-vous pour commenter.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by