MATLAB: After performing normalization of individual image how to combine and display RGB image in to single image

https://in.mathworks.com/matlabcentral/answers/79127-combining-channels-to-get-rgb-image-color-adjustment

N{i,j}=(ca{i,j}-m(i,j))/s(i,j);%GCN calculation of red channel
N1{i,j}=(ca1{i,j}-m1(i,j))/s1(i,j);%GCN calculation of green channel
N2{i,j}=(ca1{i,j}-m2(i,j))/s2(i,j);%GCN calculation of blue channel
a=N{i,j}(:);
b=N1{i,j}(:);
c=N2{i,j}(:);
d=cat(3,a,b,c);
figure,imshow(d),title('GCN ');
e(k+j,:)=d';
figure,imshow(d),title('output');
When i am using this it shows..
Transpose on ND array is not defined.
Error in ph (line 102)
e(k+j,:)=d';
and image is also not displayed…Any suggestions please.

Best Answer

Your d variable is a 3 dimensional array. The conjugate transpose operator ' cannot be used on arrays with more than 2 dimensions. If you want to exchange rows and columns then use permute, such as permute(d, [2 1 3])
However: if you did manage to exchange rows and columns, the result would still be 3D, and that is not going to fit into the vector e(k+j,:) that you try to assign the result into.
Related Question