CHAR convert a time object into a string. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: CHAR convert a time object into a string. CALL: string = char(time) VERSION: $Id: char.html,v 1.12 2008/03/31 10:27:40 hewitson Exp $ HISTORY: 23-07-2007 Diepholz Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function pstr = char(tt, varargin) 0002 % CHAR convert a time object into a string. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: CHAR convert a time object into a string. 0007 % 0008 % CALL: string = char(time) 0009 % 0010 % VERSION: $Id: char.html,v 1.12 2008/03/31 10:27:40 hewitson Exp $ 0011 % 0012 % HISTORY: 23-07-2007 Diepholz 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 0017 VERSION = '$Id: char.html,v 1.12 2008/03/31 10:27:40 hewitson Exp $'; 0018 CATEGORY = 'Output'; 0019 0020 % Check if this is a call for parameters 0021 if nargin == 2 0022 if isa(tt, 'time') && ischar(varargin{1}) 0023 in = char(varargin{1}); 0024 if strcmp(in, 'Params') 0025 pstr = plist; 0026 return 0027 elseif strcmp(in, 'Version') 0028 pstr = VERSION; 0029 return 0030 elseif strcmp(in, 'Category') 0031 pstr = CATEGORY; 0032 return 0033 end 0034 end 0035 end 0036 0037 pstr = tt.time_str; 0038 0039 % END