"Amarjot " <email@example.com> wrote in message news:firstname.lastname@example.org... > Hi, > I have a code in two components. One components is in C++ while the > second one is in Matlab. I run my code in c++ and then save the output in > a folder and then run the matlab code on the putput. Is there a way to run > the c++ code in matlab after which its output can be directly passed to > matlab code?
There are several ways; which one is "best" depends on the specific details of your MATLAB and C++ codes.
* Create a MEX-file from your C++ file and call the MEX-file from within MATLAB, or * Create an Engine application and call MATLAB from your C++ code, or * Use the SYSTEM function inside MATLAB to invoke the application compiled from your C++ code, or * Use MATLAB Coder to generate C++ code from your MATLAB code and stay completely in C++, or * Rewrite your C++ code in MATLAB or your MATLAB code in C++ manually
There are probably a few others I haven't thought of.