MATLAB: How to combine two matrix

MATLAB

example1=[25 20 30 40 50 60 70 80 90];
ex_perm = reshape((perms(example1))', 1,size(example1,2),[]);
I want [example1; ex_perm] format.
Means 1*9*362881 Matrix.

Best Answer

That is not combining two matrices. The code you show looks like it would work. An easier way of doing that would be
ex_perm = permute(perms(example1), [3 2 1]);