MATLAB: Creation of matrix (72,1) by defined elements

for loopmatrix concatenation

Hello. I have three matrices (24,1): Pstmax(24,1), Pproda(24,1), Pprodb(24,1), and i want to create a matrix ub(72,1) that contains the elements of the three defined matrices as follow:
Best regards.

Best Answer

ub = reshape([Pstmax,Pproda,Pprodb].',[],1)
or if they could be row vectors:
ub = reshape([Pstmax(:),Pproda(:),Pprodb(:)].',[],1)