If your goal is to convert C++ code to MATLAB code, manual conversion is required.
However, if you only need to call the C++ code from MATLAB, simpler solutions are possible:
- Option A: create a MEX file via MATLAB Coder (using MATLAB Coder on a simple M file that just calls the C++ function using coder.cinclude and coder.ceval) - see the last comment on a similar question.
- Option B: create a MEX file via the MEX command (you will need to write a MEX wrapper for the C++ code). More information can be found on this documentation page.