view m-toolbox/classes/@cdata/display.m @ 52:daf4eab1a51e database-connection-manager tip

Fix. Default password should be [] not an empty string
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:29:47 +0100
parents f0afece42f48
children
line wrap: on
line source

% DISPLAY implement terminal display for cdata object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: DISPLAY implement terminal display for cdata object.
%
% VERSION:     $Id: display.m,v 1.19 2011/02/18 16:48:51 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = display(varargin)

  cdatas = [varargin{:}];

  txt = {};

  for i=1:numel(cdatas)
    banner = sprintf('-------- cdata %02d ------------', i);
    txt{end+1} = banner;

    txt{end+1} = sprintf('     y:  [%dx%d], %s', size(cdatas(i).y), class(cdatas(i).y));
    txt{end+1} = sprintf('    dy:  [%dx%d], %s', size(cdatas(i).dy), class(cdatas(i).y));
    txt{end+1} = sprintf('yunits:  %s', char(cdatas(i).yunits));

    banner_end(1:length(banner)) = '-';
    txt{end+1} = banner_end;

    txt{end+1} = ' ';
  end

  if nargout == 0
    for ii=1:length(txt)
      disp(txt{ii});
    end
  end

  varargout{1} = txt;
end