Hi, I have declared the size of array as 4*4.When i run the third for loop the size of array becomes 49*49.Dont know why this happens in that loop?
pat1='11';arr=zeros(4,4); len=length(pat1); for i=1:4 for j=1:4 arr(i,j)=l+2; end endfor j=1:4 arr(1,j)=1;endfor i=1:len-1 arr(pat1(i),pat1(i+1))=l-i;endfor i=1:4 arr(i,1)=l+1;end
[EDITED, Jan Simon, Code formatted]
Best Answer