Add timestamp to command history

17 ビュー (過去 30 日間)
Irl Smith
Irl Smith 2018 年 11 月 7 日
編集済み: Irl Smith 2018 年 11 月 9 日
I want to display a timestamp (similar to the one which appears upon startup) into the command history. No luck finding this with multiple searches of the Help or Mathworks.

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 11 月 8 日
編集済み: Walter Roberson 2018 年 11 月 9 日
  2 件のコメント
Irl Smith
Irl Smith 2018 年 11 月 8 日
編集済み: Irl Smith 2018 年 11 月 8 日
Not exactly what I had in mind; I just want to insert the timestamp into the command history. A kludgey way to do this is to type ['% ' TimeStamp] where TimeStamp is a function of mine that prettyprints the result of clock, then double-click the resulting one-line output, Copy, and Paste.
Irl Smith
Irl Smith 2018 年 11 月 9 日
編集済み: Irl Smith 2018 年 11 月 9 日
I see that Walter Roberson has supposedly edited his answer, above, but it seems to be the same as before. In the current version of Matlab, typing "history" returns
To use 'history', at least one of the following products must be licensed, installed, and enabled:
Datafeed Toolbox
Trading Toolbox
which implies to me that the "history" command is maybe not the same as it was before. Another related post (for Linux) appears to be in regards to the system-level command history, not the one in Matlab. So nobody has answered my original question, as far as I can tell.

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

カテゴリ

Help Center および File ExchangeInstall Products についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by