Home > classes > @tsdata > display.m

display

PURPOSE ^

DISPLAY implement terminal display for tsdata object.

SYNOPSIS ^

function txt = display(tsdatas)

DESCRIPTION ^

 DISPLAY implement terminal display for tsdata object.

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

 DESCRIPTION: DISPLAY implement terminal display for tsdata object.

 VERSION: $Id: display.m,v 1.4 2007/07/30 12:18:28 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(tsdatas)
0002 % DISPLAY implement terminal display for tsdata object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY implement terminal display for tsdata object.
0007 %
0008 % VERSION: $Id: display.m,v 1.4 2007/07/30 12:18:28 ingo Exp $
0009 %
0010 % HISTORY: 31-01-2007 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 txt = {};
0016 
0017 tsdatas  = reshape(tsdatas, numel(tsdatas), 1);
0018 
0019 for i=1:length(tsdatas)
0020   ts = tsdatas(i);
0021   banner = sprintf('-------- tsdata %02d ------------', i);
0022   txt{end+1} = banner;
0023 
0024   txt{end+1} = ' ';
0025 
0026   tdata = get(ts, 't');
0027   xdata = get(ts, 'x');
0028   tinfo = whos('tdata');
0029   xinfo = whos('xdata');
0030 
0031   txt{end+1} = sprintf('  name:  %s', get(ts, 'name'));
0032   txt{end+1} = sprintf('    fs:  %g', get(ts, 'fs'));
0033   txt{end+1} = sprintf('     t:  [%d %d], %s', tinfo.size(1), tinfo.size(2), tinfo.class);
0034   txt{end+1} = sprintf('     x:  [%d %d], %s', xinfo.size(1), xinfo.size(2), xinfo.class);
0035   txt{end+1} = sprintf('xunits:  %s', get(ts, 'xunits'));
0036   txt{end+1} = sprintf('yunits:  %s', get(ts, 'yunits'));
0037   txt{end+1} = sprintf(' nsecs:  %d', get(ts, 'nsecs'));
0038   txt{end+1} = sprintf('    t0:  %s', char(get(ts, 't0')));
0039 
0040   banner_end(1:length(banner)) = '-';
0041   txt{end+1} = banner_end;
0042 
0043   txt{end+1} = ' ';
0044   txt{end+1} = ' ';
0045 end
0046 
0047 if nargout == 0
0048   for ii=1:length(txt)
0049     disp(txt{ii});
0050   end
0051 end
0052 
0053 % END

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