I need to manipulate this cellArray

3 Ansichten (letzte 30 Tage)
sermet
sermet am 12 Mai 2014
Beantwortet: Andrei Bobrov am 12 Mai 2014
data=[{'100'},{'p1'},{'1'};{'100'},{'p2'},{'1'};{'110'},{'p3'},{'0'};{'120'},{'1'},{'1'};{'130'},{'p4'},{'0'}];
%I need to eliminate rows which contain '0' then I need to create data matrix again as it seen;
data=[{'100'},{'p1'},{'1'};{'100'},{'p2'},{'1'};{'120'},{'1'},{'1'}];

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 12 Mai 2014
out = data(all(cellfun('isempty',regexp(data,'^0$')),2),:);

Weitere Antworten (0)

Kategorien

Mehr zu Multidimensional Arrays 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