toMatrix function

Converts 3d array of CATA data to a tall 2d matrix format