필터 지우기
필터 지우기

Overlay timestamps on many figures

조회 수: 2 (최근 30일)
Adrian
Adrian 2015년 3월 28일
댓글: Adrian 2015년 3월 30일
I have 400 images like the following one:
I want to superimpose timestamps on the top left or the top right of each figure, so I will have 400 timestamps in total. Each timestamp contains hours, minutes and seconds ('HHMMSS').
For Image1 => Timestamp1 ... Image400 => Timestamp400.
I tried to use the following code:
for i = 1:400
startDate = datenum('02-Nov-2013 13:30:06');
endDate = datenum('02-Nov-2013 13:30:51');
xdate = linspace(startDate,endDate,400);
... code to generate image
set(gca,'XTick',xdate);
datetick('x','HHMMSS');
end
But it became obvious that it didn't works, because I get the timestamps along an x axis, and I want a single timestamp for each image up to 400 images. Anyone has any clue how to do that?
  댓글 수: 2
Jan
Jan 2015년 3월 28일
The contents of the loop does not depened on i. So what should be changed in each loop? Where shoudl teh time stamps appear? In the image file or on the screen only?
Adrian
Adrian 2015년 3월 30일
The content of the loop that depends on i is within the code to generate the image. I didn't want to make the code harder to read, so I didn't add it. I just wanted the timestamp on the top left, right or center of the image. It doesn't really matter.

댓글을 달려면 로그인하십시오.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by