replace nan with blank

19 vues (au cours des 30 derniers jours)
Amish
Amish le 14 Mar 2013
abc={1,[],'weak'} now i want to remove [] from above variable abc and give me abc={1,'weak'} only, can any one suggest me any method for it.

Réponse acceptée

Andrei Bobrov
Andrei Bobrov le 14 Mar 2013
Modifié(e) : Andrei Bobrov le 14 Mar 2013
out = abc(~cellfun(@isempty,abc));
or
abc(cellfun(@isempty,abc)) = [];
  1 commentaire
Amish
Amish le 14 Mar 2013
Thanks i got it..... :)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur NaNs dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by