In general, you use the imshow command for showing an image, either single-channel (grayscale) or multi-channel (color). In case, you have multiple images stored in the way, you describe, you need to index a specific (grayscale or color) image (or color channel), and possibly need the squeeze command to remove dimensions of length 1, which might cause problems with imshow.
Please see the following code snippet using some mock-up data:
% Mock-up data.
A = uint8(round(255 * rand(1000, 32, 32, 3)));
% Select I-th image.
I = 25;
figure(1);
% Show I-th RGB image.
subplot(2, 2, 1);
imshow(squeeze(A(I, :, :, :)));
% Show I-th red channel image.
subplot(2, 2, 2);
imshow(squeeze(A(I, :, :, 1)));
% Show I-th green channel image.
subplot(2, 2, 3);
imshow(squeeze(A(I, :, :, 2)));
% Show I-th blue channel image.
subplot(2, 2, 4);
imshow(squeeze(A(I, :, :, 3)));
Output:

32 X 32is the pixel count of a color picture? if so, you can simply useimshow()to see the image. Also do you want to show one picture out of 1000 that you have? - RC0993imshow(A(1,:,:,:));- RC0993newA = permute(A, 2,3,4,1);) so that the image ID is last. Then, if you want to plot a certain image with all channels, you'd accessnewA(:,:,:,404), and if you want just one channel, you'd donewA(:,:,2,404), and no need to squeeze it anymore. - Dev-iL