view utilities/Util_timeStamp.m @ 33:161913b595ae

improved profiling
author Ray Meddis <rmeddis@essex.ac.uk>
date Thu, 11 Aug 2011 16:52:25 +0100
parents
children e097e9044ef6
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 ];