Interfacing between MATLAB and C++
-
HI everyone, I was trying to make a tool using visual C++ which uses my self made MATLAB codes and I am supposed to access them in my C++ project and derive the corresponding results. Alternatively, I can say that I read the inputs in my C++ and have to compute the results using the MATLAB codes. For all these I am supposed to make shared libraries. But when I used mcc command (thx to code project only), my machine's MATLAB said no such command exists and even the DOS prompt failed to recognise. Can anyone help me out in this or suggest me an alternative. Looking forward to guidance from someone. 1vick:)
-
HI everyone, I was trying to make a tool using visual C++ which uses my self made MATLAB codes and I am supposed to access them in my C++ project and derive the corresponding results. Alternatively, I can say that I read the inputs in my C++ and have to compute the results using the MATLAB codes. For all these I am supposed to make shared libraries. But when I used mcc command (thx to code project only), my machine's MATLAB said no such command exists and even the DOS prompt failed to recognise. Can anyone help me out in this or suggest me an alternative. Looking forward to guidance from someone. 1vick:)
-
HI everyone, I was trying to make a tool using visual C++ which uses my self made MATLAB codes and I am supposed to access them in my C++ project and derive the corresponding results. Alternatively, I can say that I read the inputs in my C++ and have to compute the results using the MATLAB codes. For all these I am supposed to make shared libraries. But when I used mcc command (thx to code project only), my machine's MATLAB said no such command exists and even the DOS prompt failed to recognise. Can anyone help me out in this or suggest me an alternative. Looking forward to guidance from someone. 1vick:)
This article[^] should give you an introduction how to make a DLL from a MatLab code and how to use it from C/C++. However, to build the DLL (or an EXE) you will need the MatLab Compiler (mcc). If the mcc comand fails on your machine, you most propably don't have the MatLab Compiler installed. If I remember correctly, it is not part of the basic installation but must be bought separately (as many other MatLab toolboxes, too).
Regards, Tim