Divert system command output from command line to textbox in GUI
古いコメントを表示
Hello, I'm designing a GUI involving callings to external functions (.exe) (e.g. system('doThis.exe') ) Those functions produce a lot of output to the MatLab command line and I'd like to simply divert them to/reproduce them in a textbox in my GUI. Is there a simple way to do this? I am using GUIDE but my textbox is created programmaticaly.
Thanks in advance.
回答 (1 件)
Walter Roberson
2013 年 4 月 29 日
0 投票
If you do not need to have it happen as the output is produced, then assign the output of system() to a variable and display that variable. The variable will not be available until the command finishes.
3 件のコメント
Nuno Benavente
2013 年 4 月 29 日
Walter Roberson
2013 年 4 月 29 日
[status, cmdout] = system('doThis.exe');
then cmdout is the string.
Capturing the output on-the-fly is messy. I think it was discussed about 3 weeks ago, but I do not seem to find the discussion.
Nuno Benavente
2013 年 4 月 29 日
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!