Home > classes > @fsdata > display.m

display

PURPOSE ^

DISPLAY implement terminal display for fsdata object.

SYNOPSIS ^

function txt = display(fsdatas, varargin)

DESCRIPTION ^

 DISPLAY implement terminal display for fsdata object.

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

 DESCRIPTION: DISPLAY implement terminal display for fsdata object.

 VERSION: $Id: display.m,v 1.8 2008/02/12 22:11:21 hewitson 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(fsdatas, varargin)
0002 % DISPLAY implement terminal display for fsdata object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY implement terminal display for fsdata object.
0007 %
0008 % VERSION: $Id: display.m,v 1.8 2008/02/12 22:11:21 hewitson Exp $
0009 %
0010 % HISTORY: 31-01-2007 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 VERSION  = '$Id: display.m,v 1.8 2008/02/12 22:11:21 hewitson Exp $';
0016 CATEGORY = 'Output';
0017 
0018 % Check if this is a call for parameters
0019 if nargin == 2
0020   if isa(fsdatas, 'fsdata') && ischar(varargin{1})
0021     in = char(varargin{1});
0022     if strcmp(in, 'Params')
0023       txt = plist();
0024       return
0025     elseif strcmp(in, 'Version')
0026       txt = VERSION;
0027       return
0028     elseif strcmp(in, 'Category')
0029       txt = CATEGORY;
0030       return
0031     end
0032   end
0033 end
0034 
0035 txt = {};
0036 
0037 for i=1:numel(fsdatas)
0038   fsd = fsdatas(i);
0039 
0040   banner_start = sprintf('----------- fsdata %02d -----------', i);
0041   txt{end+1} = banner_start;
0042   txt{end+1} = ' ';
0043 
0044   xdata  = get(fsd, 'x');
0045   ydata  = get(fsd, 'y');
0046   xinfo  = whos('xdata');
0047   yinfo  = whos('ydata');
0048 
0049   txt{end+1} = sprintf('  name:  %s', get(fsd, 'name'));
0050   txt{end+1} = sprintf('    fs:  %g', get(fsd, 'fs'));
0051   txt{end+1} = sprintf('     x:  [%d %d], %s', xinfo.size(1), xinfo.size(2), xinfo.class);
0052   txt{end+1} = sprintf('     y:  [%d %d], %s', yinfo.size(1), yinfo.size(2), yinfo.class);
0053   txt{end+1} = sprintf('xunits:  %s', get(fsd, 'xunits'));
0054   txt{end+1} = sprintf('yunits:  %s', get(fsd, 'yunits'));
0055 
0056   banner_end(1:length(banner_start)) = '-';
0057   txt{end+1} = banner_end;
0058 
0059   txt{end+1} = ' ';
0060   txt{end+1} = ' ';
0061 end
0062 
0063 if nargout == 0
0064   for ii=1:length(txt)
0065     disp(txt{ii});
0066   end
0067 end
0068 
0069 % END

Generated on Mon 31-Mar-2008 13:54:54 by m2html © 2003