replace nan with blank

17 visualizzazioni (ultimi 30 giorni)
Amish
Amish il 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.

Risposta accettata

Andrei Bobrov
Andrei Bobrov il 14 Mar 2013
Modificato: Andrei Bobrov il 14 Mar 2013
out = abc(~cellfun(@isempty,abc));
or
abc(cellfun(@isempty,abc)) = [];

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by