Manipulate system command's output

Hi, I've created a c++ program which prints lines of data to stdout. My goal is to run the program from MATLAB, and for each line (in real time!) to perform some calculations.
I currently have an exe file, and I'm running the command:
system('exe-path');
The executable is running and prints in real time to the command window the data that I need, but I would like to save each line into a variable and perform my calculations.
Is there a way to manipulate the output of the system call in real time?
- I'm running Windows 10.
Thanks!

댓글 수: 1

David Barry
David Barry 2016년 8월 25일
What do you mean exactly by real-time and how do you expect to achieve it on Windows? That aside, printing to the command line doesn't sound like the best way of transferring data to me. I would probably just do it all in MATLAB right from the off but if you must have a separate C++ program then define a better way of transferring output data in "real-time".

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

제품

질문:

2016년 8월 24일

댓글:

2016년 8월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by