How to wait for matlab called from C++ code to finish and resume project afterwards?

2 ビュー (過去 30 日間)
Anna Shtengel
Anna Shtengel 2016 年 1 月 6 日
コメント済み: Bo Li 2016 年 1 月 7 日
I'm calling matlab optimization function through matlab engine by "eval" from visual studio (C++) and I want to get the result. For that I need to know when matlab finishes, wait for it from the C++ project and resume afterwards. I found only documentation about how to do it from Python:
Is there a C++ equivalent?

回答 (1 件)

Bo Li
Bo Li 2016 年 1 月 6 日
There are MATLAB Engine APIs for C which should work in C++ environment:
The C version of MATLAB Engine does not support the asynchronous mechanism in Python Engine.
  3 件のコメント
Bo Li
Bo Li 2016 年 1 月 7 日
MATLAB Engine APIs for C is synchronous by default, which is exactly what you want: "wait for a matlab function called from C++ to finish before proceeding to the rest of my code".


Community Treasure Hunt

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

Start Hunting!

Translated by