From: Layan on
I want to know if the CAT function copies the two matrices into a new one when concatenating or it does by reference or by using pointers?
From: Walter Roberson on
Layan wrote:
> I want to know if the CAT function copies the two matrices into a new
> one when concatenating or it does by reference or by using pointers?

The only case it could do it using pointers to the memory block is if
all but one of the matrices are empty.

There is no internal way in Matlab to create an array via a group of
pointers or references to data blocks: Matlab strictly uses contiguous
memory for numeric arrays (except sparse ones.)