Show live output from API

조회 수: 9 (최근 30일)
Zohar
Zohar 2014년 7월 5일
댓글: Image Analyst 2014년 7월 7일
I'm executing an .m script from C++ API (matlabEval). Unfortunately, I can't see the output until the script (e.g. one that calls fmincon) finishes, which can be quite a while. diary or the -log command line param don't do the trick. Guys, you must do something about this. If I'm connected to a matlab session through the API, which modifies the workspace, and commands can't be executed, there's no reason that I won't see a live output in the command window like executing the command from there.

답변 (1개)

Image Analyst
Image Analyst 2014년 7월 6일
Call "drawnow" whenever you want the display to update/refresh. Sometimes it gets into such an intensive loop that it never gets time to update the display unless you force it to with drawnow.
  댓글 수: 2
Zohar
Zohar 2014년 7월 7일
It's unrelated. When you execute a script from c++ you see nothing. It only fills a string buffer when it finishes.
Image Analyst
Image Analyst 2014년 7월 7일
Well, I don't know. I have not run a C++ program that runs MATLAB mex file that does stuff in a console window.

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

카테고리

Help CenterFile Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by