jjepsuomi
jjepsuomi

Reputation: 4373

How to check the timestamp of a command from command history in Matlab?

I was wondering is it possible to check the timestamp of a command in Matlab? If I look at the command history I can see the timestamps separating the commands of different dates for example:

enter image description here

But is it possible to get the timestamp of a particular command? =)

Thank you for any advice

Upvotes: 5

Views: 2296

Answers (3)

winkmal
winkmal

Reputation: 632

As an update to @dedek-mraz's answer, and for future reference: I have located the file History.xml in %appdata%\MathWorks\MATLAB\R2018a(Windows 10), which you can open and search by your favorite text editor. Then I went to Command History in Matlab GUI and scrolled backwards to the respective day. Not very elegant, but it worked.

Upvotes: 1

Dedek Mraz
Dedek Mraz

Reputation: 814

Did you ask Google before posting? 4-th result says it's all written in ˙history.m`

This link explains that you can check history by typing history in the command line. By default this won't get you timestamps. But setting the output format:

export HISTTIMEFORMAT=' %F %T '

your history will give you timestamps.

Upvotes: 2

Groot
Groot

Reputation: 14251

The behavior you are looking for is not native to MATLAB.

BUT using this custom Command Prompt you can achieve it.

Hope it helps!

Upvotes: 4

Related Questions