0001 function display(tt)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 txt = {};
0016
0017 tt = reshape(tt, numel(tt), 1);
0018
0019 for ii = 1:length(tt)
0020 t = tt(ii);
0021
0022 b_banner = sprintf('---------- timeformat %02d ----------', ii);
0023 txt{end+1} = b_banner;
0024 txt{end+1} = ' ';
0025
0026 fields = fieldnames(t);
0027 max_length = length(fields{1});
0028 for jj = 2:length(fields)
0029 if length(fields{jj}) > max_length
0030 max_length = length(fields{jj});
0031 end
0032 end
0033
0034 for jj = 1:length(fields)
0035 field = fields{jj};
0036
0037 str_field = [];
0038 str_field(1:max_length-length(field)) = ' ';
0039 str_field = [field str_field];
0040
0041
0042 if isnumeric(t.(field))
0043 txt{end+1} = sprintf ('%s: %s',str_field, num2str(t.(field)));
0044
0045
0046 elseif ischar(t.(field))
0047 txt{end+1} = sprintf ('%s: %s',str_field, t.(field));
0048
0049
0050 elseif islogical(t.(field))
0051 if t.(field) == true
0052 txt{end+1} = sprintf ('%s: true',str_field);
0053 else
0054 txt{end+1} = sprintf ('%s: false',str_field);
0055 end
0056
0057
0058 elseif isobject(t.(field))
0059 txt{end+1} = sprintf ('%s: %s class',str_field, class(t.(field)));
0060
0061
0062 elseif isjava(t.(field))
0063 error ('### Unknown java class %s', class(t.(field)))
0064
0065 else
0066 error ('### Please define the output for this property %s', field)
0067 end
0068
0069 end
0070
0071
0072 e_banner(1:length(b_banner)) = '-';
0073 txt{end+1} = e_banner;
0074
0075 txt{end+1} = ' ';
0076 txt{end+1} = ' ';
0077
0078 end
0079
0080 if nargout == 0
0081 for ii=1:length(txt)
0082 disp(txt{ii});
0083 end
0084 end
0085
0086