To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
The primary repository for this project is hosted at git://github.com/rmeddis/MAP.git .
This repository is a read-only copy which is updated automatically every hour.
root / utilities / Util_timeStamp.m @ 38:c2204b18f4a2
History | View | Annotate | Download (380 Bytes)
| 1 |
function timeStamp=UTIL_timeStamp |
|---|---|
| 2 |
|
| 3 |
% returns a string showing time now and current date |
| 4 |
% the string should be suitable for creating fileNames |
| 5 |
% i.e. no ':' and no'-' characters |
| 6 |
|
| 7 |
today=date; |
| 8 |
idx=findstr('-',today);
|
| 9 |
today(idx)='_'; |
| 10 |
|
| 11 |
timeNow=clock; |
| 12 |
timeNow=[num2str(timeNow(4)) ':' num2str(timeNow(5))]; |
| 13 |
idx=findstr(':',timeNow);
|
| 14 |
timeNow(idx)='_'; |
| 15 |
|
| 16 |
timeStamp=[timeNow 'hr' today ]; |