removing 0 from cellarray

1 Ansicht (letzte 30 Tage)
sermet
sermet am 18 Mai 2016
Beantwortet: Andrei Bobrov am 18 Mai 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

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 18 Mai 2016
out = a(~strcmp(a,'0'))

Weitere Antworten (0)

Kategorien

Mehr zu Data Types finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by