Working implementation of Arnolid in C (with external MATLAB crash)