Home
Pourquoi pas - [MATLAB] Time stamp [entries|archive|friends|userinfo]
don_t_know_how

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

[MATLAB] Time stamp [Jun. 28th, 2009|07:08 pm]
Previous Entry Add to Memories Tell a Friend Next Entry
[Tags|, ]

Problem: pinpoint the time when the figure was generated

Solution:
function timestamp;
% pinpoint the time when the figure was generated
% by putting a time stamp in the upper left corner of the current axis

x = get(gca,'xlim'); y = get(gca,'ylim');
x = x(1) + 0.02*diff(x);
y = y(2) - 0.03*diff(y);
text(x,y,datestr(now),'fontsize',8);
linkReply

Advertisement