|
Hi,
I am experiencing the same problem. I am not a good C++
programmer and I have to make a plugin using Visual Studio
C++. To avoid C++, I wante to call matlab from C++ to do
my stuff and return the output to C++.
Could you please send me a template code , or one of your
codes where you did the same thing.
Regards
"John Reilly" <jrhokie1.nospam@yahoo.com> wrote in message
<f9s2m5$nri$1@fred.mathworks.com>...
> Hi Hisham,
>
> All you need to do to call your own MATLAB m-function is
to
> have it in the MATLAB path, just like you would have to
do
> if you were using the MATLAB environment. You can call
> addpath() on the COM object to add to the path. It may
be
> sufficient to just change the cwd of your C++ process.
>
> I doubt you can use the COM object with just the MCR
> installed, though I don't know for sure and would like
to
> find out.
>
> reilly.
>
>
> "Hisham " <hisham_abusaleh@hotmail.com> wrote in message
> <f9pli8$594$1@fred.mathworks.com>...
> > Hi,
> > I want to call my own matlab function from C++ code.
> > I found a way to do it using COM objects in code
project:
> > http://www.codeproject.com/com/matlabengine.asp
> >
> > This works for calling standard Matlab functions. What
> > should I do to call my own functions? where to put
the .m
> > file?
> > I wanted also to know if the same will work in a
computer
> > where only Matlab component runtime is installed (not
> > matlab).
> >
> > p.s If there is another, easier way to do what I need
> (call
> > my own matlab functions from C++ and which will work
with
> > MCR) it'll be also good.
> >
> > Thanks alot
>
|