Simple IPC with C/C++ process and Matlab script

조회 수: 10 (최근 30일)
Adem-Can Agdas
Adem-Can Agdas 2021년 7월 28일
답변: Yongjian Feng 2021년 7월 28일
Let's say I have a C/C++ program that continously generates some data. I want to use a matlab script to create a live plotting of that data to follow it in real time. Some sort of IPC would need to happen between that program and that matlab script. But how?
I have browsed some forums for answers but I only came across highly specific solutions for more complex problems that don't apply for my simple scenario.
Is there an easy way to achieve such a communication with matlab?

답변 (1개)

Yongjian Feng
Yongjian Feng 2021년 7월 28일
How about:
  1. The C/C++ program write data into files in a folder
  2. The matlab script monitors (unlocked) files in that folder, and plot them. Most likely keep a list of all the ones processed already. Read a file in a try/catch, so anyone being written by the C/C++ program won't be processed.

카테고리

Help CenterFile Exchange에서 Application Deployment에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by