MATLAB: Error using ==> horzcat CAT arguments dimensions are not consistent. help please……

errorhorzcat

Hi, I am getting this error
??? Error using ==> horzcat CAT arguments dimensions are not consistent.
Could anyone please suggest how to resolve the same.
This is the program i have made.
% code
original=imread('rain.jpg');
a=double(rgb2gray(original));
%global typeDEC
level=2;w='db2';
[cA,cH,cV,cD]=lwt2(eka,w,level,'wp',typeDEC);
figure;imshow([cA,cH;cV,cD]);

Best Answer

The dimensions of cA and cH or cV and cD do not match up. Look at the output of this:
whos cA cH cV cD