adding MATLAB utils for the CPP code