view utilities/Util_timeStamp.m @ 37:771a643d5c29

mainly nmanuals
author Ray Meddis <rmeddis@essex.ac.uk>
date Thu, 06 Oct 2011 15:43:20 +0100
parents e097e9044ef6
children
line wrap: on
line source
function timeStamp=UTIL_timeStamp

% returns a string showing time now and current date
% the string should be suitable for creating fileNames
% i.e. no ':' and no'-' characters

today=date;
idx=findstr('-',today);
today(idx)='_';

timeNow=clock;
timeNow=[num2str(timeNow(4)) ':' num2str(timeNow(5))];
idx=findstr(':',timeNow);
timeNow(idx)='_';

timeStamp=[timeNow 'hr' today ];