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
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 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!