How i check cell in cell array is different of 0?
1 回表示 (過去 30 日間)
古いコメントを表示
Mira le
2019 年 12 月 8 日
コメント済み: JESUS DAVID ARIZA ROYETH
2019 年 12 月 8 日
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 件のコメント
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!