Hi, I suspect that your .png files are (M x N x 3) RGB images. Therefore you are getting that error while using cat.
Since you did not provide those .png files, I downloaded and cropped them from your question.
Please run the code below and see if it gives the expected output. (The .png files I have used, are attached here)
close all; clc;
r = rgb2gray(imread('rChannel.png'));
g = rgb2gray(imread('gChannel.png'));
b = rgb2gray(imread('bChannel.png'));
rgbImage = cat(3, r, g, b);