replace nan with blank

18 Ansichten (letzte 30 Tage)
Amish
Amish am 14 Mär. 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.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 14 Mär. 2013
Bearbeitet: Andrei Bobrov am 14 Mär. 2013
out = abc(~cellfun(@isempty,abc));
or
abc(cellfun(@isempty,abc)) = [];
  1 Kommentar
Amish
Amish am 14 Mär. 2013
Thanks i got it..... :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by