Manipulate system command's output
Show older comments
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 Comment
David Barry
on 25 Aug 2016
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".
Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!