Exports a matrix from MATLAB to C as pointer to a  function