I want t know if cell is contained in another cell?

1 回表示 (過去 30 日間)
Mira le
Mira le 2019 年 12 月 8 日
回答済み: Rik 2019 年 12 月 8 日
for i=1:numel(T1)
for j=1:numel(T1{i})
if Id==i
for h=1:length(vic)
if cellfun(@isequal, vic{h}, T1{i}{j})%(vic{h}==T1{i}(j))
T1{i}(j)=0;
end
end
end
end
end
T1{i}(j) is class double
this error appear : Cell contents reference from a non-cell array object.

回答 (1 件)

Rik
Rik 2019 年 12 月 8 日
The input to cellfun must be a cell, which will be unwrapped before handing it to the function. You als have curly brackets around j and state in your explanation that j indexed with parentheses is a double.

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by