Hot can I redirect mex output to stderr?

I have compiled my script with deploytool.
I try to capture the output of fprintf(1,...) in a mymex.exe > output.txt. This does not work, output comes onto the console.

 採用された回答

Titus Edelhofer
Titus Edelhofer 2014 年 12 月 18 日

1 投票

Hi Christoph,
at the bottom of deploytool you should have "Additional Runtime Settings" where you can enable "Create log file". Would that help?
Titus

2 件のコメント

Christoph
Christoph 2014 年 12 月 18 日
Yes - this works for one mex-instance. But, I just tested it: If I run 10 jobs in parallel I would need to compile 10 different *.exe files with different file names for the log-file.
Titus Edelhofer
Titus Edelhofer 2014 年 12 月 18 日
What about using diary?
doc diary
Use e.g. time stamp or some input parameter to create different file names ...
Titus

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeMATLAB Compiler についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by