So what you're saying is that F is a cell array with 3 cells in it. Each cell contains another cell array - a 1-by-2 cell array. And the cell in the second cell F{2} contains 2 cells, each of which is ALSO a cell array. And... well it just gets so complicated to describe so let's just run it and see what F really is:
F = { {1 2}, {{1 2 },{ 2 3 }}, {2 3} }
celldisp(F)
You'll see
F =
1×3 cell array
{1×2 cell} {1×2 cell} {1×2 cell}
F{1}{1} =
1
F{1}{2} =
2
F{2}{1}{1} =
1
F{2}{1}{2} =
2
F{2}{2}{1} =
2
F{2}{2}{2} =
3
F{3}{1} =
2
F{3}{2} =
3
Why on earth do you want that? Cell arrays of cell arrays of cell arrays nested three deep? What an absolute nightmare. Why don't you just use ismember() to see if some value is contained in the array you want to search?
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
2 Comments
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/496367-how-to-fix-this-problem#comment_777578
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/496367-how-to-fix-this-problem#comment_777578
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/496367-how-to-fix-this-problem#comment_777684
Direct link to this comment
https://in.mathworks.com/matlabcentral/answers/496367-how-to-fix-this-problem#comment_777684
Sign in to comment.