function[E] = adjmatrix(adjmat)echo off;%N = max(max(adjmat));
N=max(max([adjmat{:}]));%trans = eye(N,N,'single');
trans = zeros(N,N,'single');l = size(adjmat,1)for i = 1:l r = (adjmat(i,1)); c = (adjmat(i,2)); trans(r,c) = 1; % trans(r,c) = trans(r,c) + 1;
end;maxE = trans;
in above code i have got following error how to solve it ??? Error using ==> subsindex Function 'subsindex' is not defined for values of class 'cell'.
Error in ==> createadj at 18 trans(r,c) = 1;
[EDITED, Jan, please format your code properly – thanks!]
Best Answer