f



matlab beginner: calling matlab from C/C++

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
0
11/28/2007 3:03:51 PM
comp.soft-sys.matlab 211265 articles. 25 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
943 Views

Similar Articles

[PageSpeed] 5

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

0
poespam-trap (1550)
11/28/2007 4:18:35 PM
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.

0
atrish (12)
11/29/2007 7:21:47 AM
Reply: