Revision 33:161913b595ae utilities
| utilities/Util_timeStamp.m | ||
|---|---|---|
| 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 ]; |
|
Also available in: Unified diff