MATLAB: How i check cell in cell array is different of 0 cell for i=1:numel(T1) if T1{i}~=0 Items=union(Items,T1{i}); end end ~= is not for cell Best Answer an example: T1={{0} {4} {5} {6} {5}}items=vertcat(T1{cellfun(@(x) ~isequal(x,{0}),T1)});items=[items{:}]; Related SolutionsMATLAB: Change the structure of cell A = A'; MATLAB: Multiply two cell arrays Try this:res=cellfun(@times,mul1,mul2,'uni',0) Related QuestionMinimum for different sized cell arraysHow to make difference between two cell arrayHow to reformat a tableError with indexing ‘First argument must be numeric or logical’How to store the matrix value in cell arrayIndexing for cell arrays
Best Answer