>> c = randn([3,4,5]); >> d = randn([3,4,7]); >> e = cat(3,c,d); >> size(e) ans = 3 4 12