On Matlab coder I get the error "FOR loop index expressions of unknown size are only supported if they are of the form A:B or A:B:C" whenever I use for indexing a vector in a for loop, example:
for e=s:-1:1
for l=1:s
for k=1:b
E=find(sum(B(:,l,:))==k)';
coder.varsize('E', [1,70],[0,1]);
for j=E
coder.varsize('i', [1,70],[0,1]);
for i=E
if isequal(B(:,e,i),B(:,e,j)) %for k=1 we want the second column of i to be identical to the first colum of j or vice versa.
if isequal(sort(sum(B(1:s,s+1:b+s,i))),sort(sum(B(1:s,s+1:b+s,j))))
B(:,l,i)=B(:,l,j);
B(l,:,i)=B(l,:,j);
else
;
end
end
end
end
end
end
end
I understand that coder need something like "A:B" but my vector E here contains for example [7,11,13] and I cannot use something like "E(1,1):E(1,3)" because then I obvisouly get 7 8 9 10 11 12 13.
Any suggestions on how I could modify the code?
thank you