removing 0 from cellarray

1 visualizzazione (ultimi 30 giorni)
sermet
sermet il 18 Mag 2016
Risposto: Andrei Bobrov il 18 Mag 2016
a=[{'0'};{'0'};{'0'};{'b10'};{'01'};{'p10'}]; %cell
How can I remove all {'0'} from a array.
a_removed_zero=[{'b10'};{'01'};{'p10'}]; %cell

Risposta accettata

Andrei Bobrov
Andrei Bobrov il 18 Mag 2016
out = a(~strcmp(a,'0'))

Più risposte (0)

Categorie

Scopri di più su Multidimensional Arrays in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by