I'm going to create an adjacency matrix from a cell array, but faced two main problems:
I don't know how to access to cell array's elements; so an adhoc method was used.
(and the most important) The code produces an error and the partial result is also a weird one!
The cell array is as the following image:
The code is as follows:
for i=1:N
L=size(Al{i});
Len=L(1,2);
for j=1:Len
elm=Al{i};
D=elm(i,j);
Adjm(i,D)=1;
end
end
The code produces this error:
P.S.: The code is part of a program to construct adjacency matrix to represent superpixels adjacency within an image. There may be a specific solution for that!