How do I combine 3D matrices with concatenation along the row index?

Suppose that I have two matrices, A and B. Does something more elegant exist (e.g. in MatrixOP) to combine them as below?

variable nArows = DimSize(A,0)
variable nBrows = DimSize(B,0)
duplicate A C
redimension/N=(nArows+nBrows,*,*) C
C[nArows,][][] = B[p-nArows][][]

 

The operation Concatenate/NP=0 {A, B} C creates C building along layers not into rows.

A[6,2,4]    B[6,2,4] --> C[6,2,8]          desired is  C[12,2,4]

Then we must have different Igor versions. My command is doing what you requested in your initial post, i.e., stitching the rows together. NP=0 means exactly that => stitch rows without promotion. See also the attachment.

Concatenate.pxp (154.59 KB)