matlab and external .exe communicating through memory ?

조회 수: 2 (최근 30일)
Istvan
Istvan 2016년 5월 11일
댓글: Istvan 2016년 5월 12일
Hello,
I am trying to make Matlab work with an external .exe. The idea is:
  1. Matlab shall start the .exe and pass some parameters to it ( I guess System(...) does the job for this -- or [status,cmdout] = dos(...); )
  2. now, the exe runs in a loop, getting some images from a camera / other data and puts it to memory.
  3. Matlab should get this data from memory while the exe runs. I was thinking of allocating the memory in Matlab and passing its pointer to the exe as starting argument (so it knows where to put the data).
  4. the exe is then stopped from matlab, setting a memory value (again from input arguments)
Could anyone help me on how to do such a thing? Googled for a long time, but could not find decent tips/starting points.
Any help is appreciated - thanks!

채택된 답변

Walter Roberson
Walter Roberson 2016년 5월 11일
Passing a pointer will not work, as the processes are in different address spaces.
You can memory-map a common file; see https://msdn.microsoft.com/en-ca/library/windows/desktop/aa366878%28v=vs.85%29.aspx and MATLAB memmapfile()
  댓글 수: 3
Istvan
Istvan 2016년 5월 12일
Thanks a lot! :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by