interfacing matlab and c++

hi
    i have done some work in both matlab and c++.i wanted to know
about some good resources on the net about interfacing and using the two together and examples of application when the two are used together.
                                   thanx
fafaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
kjpusCommented:
What do you want to do exactly? Call Matlab from C++? Or call C++ from Matlab?
Calling C++ from Matlab can be done by generating DLL from your C++ code and use the matlab inteface to generic DLL. Or, you can write C mex files, which is a sort of wrapper/interface for Matlab types. I find Mex files a bit more tedious to deal with. On the other hand, if you have older version of matlab, this is the only option. The other option is to use COM/DDE interface.
Calling Matlab from C++ can be done in two ways, using matlab engine or matlab compiler (extra $$).
As for resources and examples, Matlab's own document is a good starting point.

0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
r-kCommented:
Yes, good summary by kjpus.

Here's a link for mex-files, because I think that is what you are asking about:

 http://www.mathworks.com/support/tech-notes/1600/1605.html
0
 
Ralf KlattEmployee in Civil ServiceCommented:
Hi,

As far as I know is a "Vector" the basic data structure in MATLAB. It provides easy, fast, effective, and scalable data structures giving programming an algebraic view for data, even for complex data structures. Matlab allows you do develop fast technical solutions. However, MATLAB loops, and UIs are too slow :o. It is your responsibility to reformulate your code and data structures into matrices and vectors.

Here's a sample on how to use MATLAB in C++: http://www.codeproject.com/cpp/mtvector.asp


I hope this is what you're looking for ...
Best regards,
Raisor
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.