on a 64bit linux system (ubuntu 16), the function mxCreateMatrix3 fails to generate matrix with the correct dimensions. The issue is the use of int vs size_t. The function mxSetDimensions takes size_t as its inputs, but mxCreateMatrix3 passes int. on (my) 64bit system, int is 4 bytes, whereas size_t is 8 bytes. This caused garbage dimensions being assigned to the matrix.
on a 64bit linux system (ubuntu 16), the function mxCreateMatrix3 fails to generate matrix with the correct dimensions. The issue is the use of int vs size_t. The function mxSetDimensions takes size_t as its inputs, but mxCreateMatrix3 passes int. on (my) 64bit system, int is 4 bytes, whereas size_t is 8 bytes. This caused garbage dimensions being assigned to the matrix.