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 ExchangeProgramming についてさらに検索

製品

質問済み:

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