replace nan with blank

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

0 votes

out = abc(~cellfun(@isempty,abc));
or
abc(cellfun(@isempty,abc)) = [];

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by