필터 지우기
필터 지우기

Question about sets and cell array

조회 수: 1 (최근 30일)
John
John 2013년 9월 6일
I have a cell array :
B{1} = [0,1,2]
I want to now remove the zero. How do I do it?

채택된 답변

Azzi Abdelmalek
Azzi Abdelmalek 2013년 9월 6일
편집: Azzi Abdelmalek 2013년 9월 6일
B{1}(1)=[]
If you want to remove all zeros in B{1}
B{1}(B{1}==0)=[]

추가 답변 (1개)

Image Analyst
Image Analyst 2013년 9월 6일
B{1} = [1,2];
If you want something more general, then say in what ways does it need to be general. Like, does it need to remove all zeros in B{1} only? Or does it need to remove all zeros in B{2}, B{3} and so on? The limited, very specific question you posted can be solved with my code.

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by