MATLAB: Func thar operates like repmat

MATLAB

Hi i need to write in one code line function who does the same as repmat function Anyone's idea please 🙂

Best Answer

Hint:
Instead of writing
MyRGBImage = repmat(MyGrayScaleImage, 1, 1, 3)
I write
MyRGBImage = repmat(MyGrayScaleImage(:,:, ones(1,3))