Hi all,
I would like to generate 4D matrix with following dimensions:
dim1 = image heightdim2 = image widthdim3 = color - can be 1 (grayscale), 2 (Red/Blue) or 3 (RGB color components)dim4 = image - number of distinct images
I have 1024(dim1)X1280(dim2) matrix (four of them; image5, image15, imaage6, image18). I would like to add third and fourth dimension to this matrix to create a 4D matrix.
I can use cat(4,image5,image15,imaage6,image18) to add images as another dimension. But how can I add the color dimension (dim3), which should be 1 (grayscale)?
Thanks a lot!
Best Answer