Hi, I have the following code.
index1=sub2ind(size(I),r1,c1); info{i}(:,1)=I(index1);
It shows me the following error:
??? Subscripted assignment dimension mismatch.
can anybody help?
sub2ind
index1=sub2ind(size(I),r1,c1); info{i}(:,1)=I(index1);
Best Answer