Home > classes > @fsdata > display.m

display

PURPOSE ^

DISPLAY implement terminal display for fsdata object.

SYNOPSIS ^

function varargout = display(varargin)

DESCRIPTION ^

 DISPLAY implement terminal display for fsdata object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: DISPLAY implement terminal display for fsdata object.

 M-FILE INFO: Get information about this methods by calling
              >> fsdata.getInfo('display')

              Get information about a specified set-plist by calling:
              >> fsdata.getInfo('display', 'None')

 VERSION:     $Id: display.m,v 1.14 2008/09/04 15:29:30 ingo Exp $

 HISTORY:     31-01-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 % DISPLAY implement terminal display for fsdata object.
0002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0003 %
0004 % DESCRIPTION: DISPLAY implement terminal display for fsdata object.
0005 %
0006 % M-FILE INFO: Get information about this methods by calling
0007 %              >> fsdata.getInfo('display')
0008 %
0009 %              Get information about a specified set-plist by calling:
0010 %              >> fsdata.getInfo('display', 'None')
0011 %
0012 % VERSION:     $Id: display.m,v 1.14 2008/09/04 15:29:30 ingo Exp $
0013 %
0014 % HISTORY:     31-01-2007 M Hewitson
0015 %                 Creation
0016 %
0017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0018 
0019 function varargout = display(varargin)
0020 
0021   %%% Check if this is a call for parameters
0022   if utils.helper.isinfocall(varargin{:})
0023     varargout{1} = getInfo(varargin{3});
0024     return
0025   end
0026 
0027   fsdatas = utils.helper.collect_objects(varargin(:), 'fsdata');
0028 
0029   txt = {};
0030 
0031   for i=1:numel(fsdatas)
0032     fsd = fsdatas(i);
0033 
0034     banner_start = sprintf('----------- fsdata %02d -----------', i);
0035     txt{end+1} = banner_start;
0036     txt{end+1} = ' ';
0037 
0038     xdata  = fsdatas(i).x;
0039     ydata  = fsdatas(i).y;
0040     xinfo  = size(xdata);
0041     yinfo  = size(ydata);
0042 
0043     txt{end+1} = sprintf('    fs:  %g', fsdatas(i).fs);
0044     txt{end+1} = sprintf('     x:  [%d %d], %s', xinfo(1), xinfo(2), class(xdata));
0045     txt{end+1} = sprintf('     y:  [%d %d], %s', yinfo(1), yinfo(2), class(ydata));
0046     txt{end+1} = sprintf('xunits:  %s', char(fsdatas(i).xunits));
0047     txt{end+1} = sprintf('yunits:  %s', char(fsdatas(i).yunits));
0048     txt{end+1} = sprintf('    t0:  %s', char(fsdatas(i).t0));
0049 
0050     banner_end(1:length(banner_start)) = '-';
0051     txt{end+1} = banner_end;
0052 
0053     txt{end+1} = ' ';
0054   end
0055 
0056   %%% Prepare output
0057   if nargout == 0
0058     for ii=1:length(txt)
0059       disp(txt{ii});
0060     end
0061   elseif nargout == 1
0062     varargout{1} = txt;
0063   end
0064     
0065 end
0066 
0067 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0068 %                               Local Functions                               %
0069 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0070 
0071 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0072 %
0073 % FUNCTION:    getInfo
0074 %
0075 % DESCRIPTION: Get Info Object
0076 %
0077 % HISTORY:     11-07-07 M Hewitson
0078 %                Creation.
0079 %
0080 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0081 
0082 function ii = getInfo(varargin)
0083   if nargin == 1 && strcmpi(varargin{1}, 'None')
0084     sets = {};
0085     pl   = [];
0086   else
0087     sets = {'Default'};
0088     pl   = getDefaultPlist;
0089   end
0090   % Build info object
0091   ii = minfo(mfilename, 'fsdata', '', utils.const.categories.output, '$Id: display.m,v 1.14 2008/09/04 15:29:30 ingo Exp $', sets, pl);
0092 end
0093 
0094 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0095 %
0096 % FUNCTION:    getDefaultPlist
0097 %
0098 % DESCRIPTION: Get Default Plist
0099 %
0100 % HISTORY:     11-07-07 M Hewitson
0101 %                Creation.
0102 %
0103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0104 
0105 function plo = getDefaultPlist()
0106   plo = plist();
0107 end
0108

Generated on Mon 08-Sep-2008 13:18:47 by m2html © 2003