How i check cell in cell array is different of 0?
    조회 수: 5 (최근 30일)
  
       이전 댓글 표시
    
for i=1:numel(T1)
if T1{i}~=0
         Items=union(Items,T1{i});
        end
end
~= is not for cell
댓글 수: 0
채택된 답변
  JESUS DAVID ARIZA ROYETH
      
 2019년 12월 8일
        an example: 
T1={{0} {4} {5} {6} {5}}
items=vertcat(T1{cellfun(@(x) ~isequal(x,{0}),T1)});
items=[items{:}];
댓글 수: 2
  JESUS DAVID ARIZA ROYETH
      
 2019년 12월 8일
				items=cell2mat(horzcat(T1{:}));
items(items==0)=[]
추가 답변 (0개)
참고 항목
카테고리
				Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

