Engine Library - how can i print text in the Command-Window

Hy there,
I'm starting with the Engine-Libary-API and I'm very enthused about the amazing possibilities with Matlab-Engine Calling from an application.
But there is still a big question:
How can i print some Text to the Command Window (which appears, when i start the Engine-Session with "engOpen") ???
Best Regards,
Josef

回答 (2 件)

Kaustubha Govind
Kaustubha Govind 2011 年 5 月 20 日

0 投票

engEvalString with the DISP command should do it for you:
engEvalString(ep, "disp('Your text here.');");
Josef
Josef 2011 年 5 月 23 日

0 投票

Hey Kaustubha,
thanks for you Response!
I've tried engEvalString(ep, "disp('Your text here.');"); so far, but it doesn't work.
I think the "Your text here."-Output-String can only get cached with the "int engOutputBuffer(Engine *ep, char *p, int n);"-API-Function like any other Matlab-Output in Engine-API-Mode.
But it seems that it's not possible to push it to the Command-Window.
Any other ideas??? - I've tried nearly everything so far, but still nothing does work :(

2 件のコメント

Kaustubha Govind
Kaustubha Govind 2011 年 5 月 23 日
Are you setting engSetVisible to true?
Aly Abdellatif
Aly Abdellatif 2022 年 7 月 22 日
That may work for Windows but how to do the same in linux

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeCall MATLAB from C についてさらに検索

質問済み:

2011 年 5 月 20 日

コメント済み:

2022 年 7 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by