view utilities/Util_timeStamp.m @ 35:25d53244d5c8

latest parameters
author Ray Meddis <rmeddis@essex.ac.uk>
date Thu, 15 Sep 2011 13:50: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 ];