Added 'getMatrixAsVector' function.