MATLAB: Adding 3rd dimensional array

adding arrays

I have same data in two matrices A=50x60x100 and B=50x60x80. I want to add third array to combine them in one matrix like C=50x60x180. How can add them? Thanks in advance.

Best Answer

C = cat(3, A, B);