removing 0 from cellarray

1 view (last 30 days)
sermet
sermet on 18 May 2016
Answered: Andrei Bobrov on 18 May 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

Accepted Answer

Andrei Bobrov
Andrei Bobrov on 18 May 2016
out = a(~strcmp(a,'0'))

More Answers (0)

Categories

Find more on Multidimensional Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!