The classic reason to get out a black window when you use imshow() but imshow() with  looks okay, is to start with image data that is you start with single or double precision data values that are in the range 0 to 1, and you cat() those together with zeros that are uint8.
gi = rand(5, 7);
rgb = cat(3,gi,zeros(size(gi),'uint8'),zeros(size(gi),'uint8'));
There is another related even more common problem, where you get out an image that is completely saturated in the color with possibly a couple of scattered black spots, but no shades of color. With rgb images, this is commonly a completely white image except for a couple of black locations. This related problem is caused by having converted uint8 values to double precision in the range 0. to 255., and then put together with other double precision values such that the end result is double precision but with a value range of 0. to 255. Example,
ri = randi([0 255], 5, 7, 3, 'uint8');
di = double(ri);
imshow looks at the data type to decide what to do, instead of looking at the data range. Data type double() expects shades according to values in the range 0 to 1. Any value less than 0 is treated the same as 0 when showing an image; any value greater than 1 is treated as 1 (full brightness) when showing the image. Double precision 0. to 255. is mostly values greater than 1, so all positions are to be maximum brightness except for the few that are 0 (black.)
You need to carefully check the datatype and value range of what you are concatenating together.
If you want to use double precision for images, do not use double() to convert it: use im2double(), which will rescale by the appropriate constant so that the maximum expected value for the data type is mapped to 1. It is really common for people to think that double(IMAGE) converts the representation of IMAGE from uint8 to something that will display the same way but be double precision, and that is just not the case.