removing 0 from cellarray

조회 수: 1 (최근 30일)
sermet
sermet 2016년 5월 18일
답변: Andrei Bobrov 2016년 5월 18일
a=[{'0'};{'0'};{'0'};{'b10'};{'01'};{'p10'}]; %cell
How can I remove all {'0'} from a array.
a_removed_zero=[{'b10'};{'01'};{'p10'}]; %cell

채택된 답변

Andrei Bobrov
Andrei Bobrov 2016년 5월 18일
out = a(~strcmp(a,'0'))

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Types에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by