Data exchange

Posted on 2003-12-03
Last Modified: 2010-04-01
Dear all,

Does someone want to help me on how to communicate between executable program written in VisualC++ and another executable program written in Matlab communicate by using DDE (Dynamic data exchange) to exchange data to each other? As I know that Matlab.exe is able to act as DDE server or DDE client, but I have never done it before.  So, may someone please give me an example?

I'm also trying to establish a communication between Matlab and external software, written in Fortran and C languages. The data should be exchanged every a defined time, e.g. 200ms, to each other (data alter from the first program to the second and from the second require passing back to the first). But, I'm not quite sure if it's possible to use DDE. So, is it possible? and how?

Thanking you in advance for your reply,
Question by:azzedine
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 86

Accepted Solution

jkr earned 50 total points
ID: 9868431

Author Comment

ID: 9869305
Sorry I forot to mention that I want to communicate Matlab.exe and C++.exe over UNIX environment. I'm not sure but I think it's not possible to use DDE (Dynamic data exchange) under UNIX. So, does someone want to help and tell me how I can communicate Matlab.exe and C++.exe under UNIX?

Thanking you again in advance for your reply,
LVL 86

Expert Comment

ID: 9869329
>> I think it's not possible to use DDE (Dynamic data exchange) under UNIX

That's correct. On UN*X, you will have to resort to calling applications from MATLAB as described on ("Calling C and Fortran Programs from MATLAB")
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Assisted Solution

RJSoft earned 50 total points
ID: 9874945
In Unix communication between exe's is easy using environment variables. Create a script that creates the environment variables and then start your exe's.


Author Comment

ID: 9875967
Dear Everyone,

Thank you very much for your answers. It may help me if you would like to tell me more on how to create a script using communication between environment variables. Could you please give me an example?

As I have seen that the use of intermidiate file is slow. I want to use another communication option simple but faster than using file. Is that possible?

Thank you again for you reply,
LVL 86

Expert Comment

ID: 9876000
>>how to create a script using communication between environment variables

This is a one-way communication - you cannot return anything using env. variables.

Expert Comment

ID: 10364827
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Split between jkr and RJSoft.

Please leave any comments here within the next four days.


EE Cleanup Volunteer

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C language IDE – Compilers installation 14 89
Getting IP address 8 121
Move constructor only called if marked noexcept? 6 119
object oriented programming comparison 5 92
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question