How i check cell in cell array is different of 0?

2 次查看(过去 30 天)
for i=1:numel(T1)
if T1{i}~=0
Items=union(Items,T1{i});
end
end
~= is not for cell

采纳的回答

JESUS DAVID ARIZA ROYETH
an example:
T1={{0} {4} {5} {6} {5}}
items=vertcat(T1{cellfun(@(x) ~isequal(x,{0}),T1)});
items=[items{:}];
  2 个评论
Mira le
Mira le 2019-12-8
编辑:Mira le 2019-12-8
T1 is like that
>> T1
T1 =
9×1 cell array
[1×3 double]
[1×2 double]
[1×2 double]
[1×3 double]
[1×2 double]
[1×2 double]
[1×2 double]
[1×4 double]
[1×3 double]
How I can use this function that you mentioned above
please help me

请先登录,再进行评论。

更多回答(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