Hi Jason - perhaps I'm misunderstanding what you want, but if you want to create one image that is the combination (montage) of all images from each of the subplots that are arranged in 8 rows of 6 columns, then you could do something like the following. Note that the assumption here is that each image is of the same dimension. If this assumption is invalid, then you can modify the code to resize each image to some fixed mxnx3 dimension using imresize.
First create some random images arranged in an 8x6 subplot grid
close all;
figure;
m = 8;
n = 6;
hAxes = [];
for u=1:m
for v=1:n
hAxes(u,v) = subplot('Position',[(v-1)/n 1-(u/m) 1/n 1/m]);
image(repmat(uint8(randi(255,1,1,3)),100,200,1),'Parent',hAxes(u,v));
set(hAxes(u,v),'XTick',[],'YTick',[]);
end
end
So this will give us our 48 subplots on the figure where each subplot contains a 100x200x3 image of a solid colour.
Now we just take the image from each subplot and combine it into a larger image
allImgs = cell(m,n);
for u=1:m
for v=1:n
hImg = findobj('Parent',hAxes(u,v),'Type','image');
allImgs{u,v} = get(hImg,'CData');
end
end
figure;
montageImg = cell2mat(allImgs);
image(montageImg);
set(gca,'XTick',[],'YTick',[]);
We collect the images from each subplot into a cell array, and then convert that into a matrix/image which is just the combination of all subplot images.
Note how that hAxes is a 8x6 matrix of handles versus the one-dimensional array that you are using. I found that the 2D approach is a little easier since I know exactly where each subplot is, and so know where each image should go in the montage.