I'm relatively new to the world of Matlab. I want to call my matlab own code from a C/C++ program on a machine with matlab installed. Do I need to compile the matlab code using matlab compiler tool or the matlab engine is enough for this? Thanks a lot for your help
On Nov 28, 10:03 am, "Paeo Campigotto" <campigo...@dit.unitn.it> wrote: > I'm relatively new to the world of Matlab. > I want to call my matlab own code from a C/C++ program on a > machine with matlab installed. > Do I need to compile the matlab code using matlab compiler > tool or the matlab engine is enough for this? You should be able to use the engine for this. - Randy
Randy Poe <poespam-trap@yahoo.com> wrote in message <182597a4-106e-48cb-a3e9- e3dcadf194f9@i12g2000prf.googlegroups.com>... > On Nov 28, 10:03 am, "Paeo Campigotto" <campigo...@dit.unitn.it> > wrote: > > I'm relatively new to the world of Matlab. > > I want to call my matlab own code from a C/C++ program on a > > machine with matlab installed. > > Do I need to compile the matlab code using matlab compiler > > tool or the matlab engine is enough for this? > > You should be able to use the engine for this. > > - Randy > i think you have written the .m files that you need to call using c\c++. then there is two options open for you. 1> first compile the code using "mcc -m file.m" command in the matlab command window. which will generate the stand alone application for your matlab code. then call the .exe file using c\c++. 2> otherwise you have another option. you can use matlab combuilder to generate com object corresponding to your matlab file. it is a very easy way.then you can use your c\c++\vc++\vb compiler to use it as reference. and just call the matlab function from those compiler. for details please refer to matlab help file for comtool.