How to fix this problem?

1 view (last 30 days)
Mira le
Mira le on 12 Dec 2019
Commented: Mira le on 13 Dec 2019
>> sitem
sitem =
1 2 3
>> U
U =
1×2 cell array
[1×2 double] [1×2 double]
U{1}
ans =
1 2
>> U{2}
ans =
2 3
I want to check each value of sitem if it contain in U an put them in F ={}
the output is F = { {1 2}, {{1 2 },{ 2 3 }}, {2 3} }
please help me
  2 Comments
Mira le
Mira le on 13 Dec 2019
that not what I meant
I said before I have to check each value of sitem if it contains in U
for example;
a=1;
for i=1:length(sitem)
for j=1:length(U)
if ismember(sitem(i),U{j})
F{a } = [F U{j}];
end
end
a=a+1;
end

Sign in to comment.

Answers (0)

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by