MATLAB: Index in position 1 exceeds array bounds

image processing

hello,
i m new on matlab
in this algrothme is showing me that the size
of the indicated variable or array appears to be changing with each loop iteration
reslt is matrice
thank you for helping
for i=1:N
temp=lena2(i,:);
rslt=eemd(temp,0.2,nesb,4);
for j= 1:N
for k=1:5
rsltd1(i,j,k)=rslt(j,k+1);
end
end
end

Best Answer

Yes, it's just a warning though, not an error. If you want you could preallocate it before the loop with the largest size you think it will have
rsltd1= zeros(N, N, 5);