Can someone please explain what is going on in the second loop and how its happening.
N = 90for i=1:N % importing files
FName=sprintf('%d.bmp',i); image1=imread([FFolder1, FName]); image2=imread([FFolder2, FName]); image3=imread([FFolder3, FName]); % taking the 2D image (image1-3) and sticks it into the i'th
% slice (plane) of a 3D image
im1(:,:,i)=image1; % "0"
im2(:,:,i)=image2; % "1"
im3(:,:,i)=image3; % "2"
end% What is going on in this loop?
for i=1:N im(:,:,i)=im1(:,:,i); im(:,:,i+N)=im2(:,:,i); im(:,:,i+2*N)=im3(:,:,i);end
Best Answer