Call C++ code from MATLAB?

前端 未结 4 617
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-03 03:36

I have some code which I need to code in C++ due to heavy reliance on templates. I want to call this code from MATLAB: basically, I need to pass some parameters to the C++ c

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-03 04:31

    Have a look at the MEX-files Guide, especially Section 25–27 for C++. The basic STL/Boost data structures should work, but threading with Boost could be a problem.
    cout will not work as expected in C++, mexPrintf has to be used instead.

提交回复
热议问题