MATLAB Answers

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

3 views (last 30 days)
Mira le
Mira le on 8 Dec 2019
Answered: Rik on 8 Dec 2019
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.

  0 Comments

Sign in to comment.

Answers (1)

Rik
Rik on 8 Dec 2019
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.

  0 Comments

Sign in to comment.

Sign in to answer this question.