Home > classes > @ao > display.m

display

PURPOSE ^

DISPLAY implement terminal display for analysis object.

SYNOPSIS ^

function txt = display(ao)

DESCRIPTION ^

 DISPLAY implement terminal display for analysis object.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: DISPLAY implement terminal display for analysis object.

 VERSION: $Id: display.m,v 1.10 2007/06/19 08:00:05 ingo Exp $

 HISTORY: 31-01-2007 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function txt = display(ao)
0002 % DISPLAY implement terminal display for analysis object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY implement terminal display for analysis object.
0007 %
0008 % VERSION: $Id: display.m,v 1.10 2007/06/19 08:00:05 ingo Exp $
0009 %
0010 % HISTORY: 31-01-2007 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 txt = {};
0016 
0017 ao  = reshape(ao, numel(ao), 1);
0018 
0019 for i=1:length(ao)
0020   a = ao(i);
0021   data   = get(a, 'data');
0022   dinfo  = whos('data');
0023   hist   = get(a, 'hist');
0024   hinfo  = whos('hist');
0025 
0026   if nargin ~= length(ao)
0027     banner_start = sprintf('----------- ao %02d -----------', i);
0028   else
0029     banner_start = sprintf('----------- ao: %s -----------', inputname(i));
0030   end
0031 
0032   txt{end+1} = banner_start;
0033   txt{end+1} = ' ';
0034   txt{end+1} = sprintf('       tag:  %06d', get(a, 'tag'));
0035   txt{end+1} = sprintf('      name:  %s', get(a, 'name'));
0036   txt{end+1} = sprintf('provenance:  %s', char(get(a, 'provenance')));
0037   txt{end+1} = sprintf('   comment:  %s', char(get(a, 'comment')));
0038   if isa(data, 'cell')
0039     txt{end+1} = sprintf('      data:  None');
0040   else
0041     txt{end+1} = sprintf('      data:  %s / %s', dinfo.class, get(data, 'name'));
0042   end
0043   if isa(hist, 'cell')
0044     txt{end+1} = sprintf('      hist:  None');
0045   else
0046     txt{end+1} = sprintf('      hist:  %s / %s / %s', hinfo.class, get(hist, 'name'), get(hist, 'version'));
0047   end
0048   txt{end+1} = sprintf('     mfile:  %s', a.mfilename);
0049 
0050   banner_end(1:length(banner_start)) = '-';
0051   txt{end+1} = banner_end;
0052 
0053   txt{end+1} = ' ';
0054   txt{end+1} = ' ';
0055 end
0056 
0057 if nargout == 0
0058   for ii=1:length(txt)
0059     disp(txt{ii});
0060   end
0061 end
0062 
0063 % END

Generated on Mon 03-Sep-2007 12:12:34 by m2html © 2003