Updates to allow compiled C-cod to be run from Matlab