How to call MATlab user defined function in Visual studio 2015 C++ in main code?


  • FYI, I am new to this. I have main source code in VC++ and some of the work is done in MATlab as function. I don't want to write whole matlab function in c++ but rather call it in VC++. Is there any easy way to do that?

    Please help me in this matter.

    kind regards

    Monday, December 12, 2016 1:20 AM

All replies

  • Hi Z.Nizamani,

    According to your description, I have searched two similar threads about your issue, please refer to them and may be helpful for you:

    If your question has not been resolved from above threads, I suggest you had better post your issue to the following forum:

    But as far as I know, Matlab language is c-like language, if you could understand the program, I think we could translate the code to C++ project. Serval years before, I mainly study simple machine learning and chaotic environment, I have found that when the program has been translated to the C++ codes, the speed of program execution has been increased.

    Disclaimer: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    • Proposed as answer by qing__Moderator Thursday, December 15, 2016 9:28 AM
    Tuesday, December 13, 2016 7:30 AM