フィルターのクリア

Disable the Formatting Syntax in a Text Log File

1 回表示 (過去 30 日間)
Ledger Yu
Ledger Yu 2015 年 4 月 16 日
コメント済み: normanius 2018 年 9 月 25 日
I'm calling a Matlab script from windows command line and generate the log as a text file:
matlab -r "run C:\Code\DailyProcess.m;" -logfile "DailyProcessLog.txt"
The log file indeed contains whatever information you'll see in the command window should you run the script directly in Matlab. However, it also gives you the formatting language like this:
In <a href="matlab: opentoline('C:\Code\DailyProcess.m',21,1)">DailyProcess at 21</a>
You see that "<a href="matlab:" stuff is really annoying (I see a couple of lines like this). Is there a way to disable the formatting syntax in a log file and simply output a plain text file?
I'm using Matlab 2013b in Windows 7. The reason to call matlab from command line is because I need to schedule the job in Windows Task Scheduler.

採用された回答

Jan
Jan 2015 年 4 月 16 日
編集済み: Jan 2015 年 4 月 16 日
You can try the undocumented switch
feature('HotLinks', 'off');
Another idea is to clean the logfile afterwards.
I do not use the output to the command line for logging, but forward every message, which should appear in the logs to a dedicated function, which write copies to the command line and to a file.
  2 件のコメント
Ledger Yu
Ledger Yu 2015 年 5 月 15 日
Looks like the issue is still there. Could you please shed some more light on the way you record logs? Ideally I do want to see every message to a dedicated function (including every command passed to command and any failure messages).
normanius
normanius 2018 年 9 月 25 日
Note that Jan's answer also disables the special formatting of tables (font type of header and row names). So not only "Hot Links" are disabled, but special formatting in general. Thanks, Jan!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB Code Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by