view m-toolbox/classes/@history/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 history object.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% DESCRIPTION: DISPLAY implement terminal display for history object.
%
% CALL:        txt = display(history)
%
% INPUT:       history - history object
%
% OUTPUT:      txt     - cell array with strings to display the history object
%
% VERSION:     $Id: display.m,v 1.19 2011/02/18 16:48:52 ingo Exp $
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function varargout = display(varargin)

  hists  = [varargin{:}];

  txt = utils.helper.objdisp(hists);

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

  varargout{1} = txt;
end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                               Local Functions                               %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function new_txt = single_cell(txt_field)

  new_txt = {};
  for ii=1:length(txt_field)
    if iscell(txt_field{ii})
      hh = single_cell(txt_field{ii});
      new_txt(end+1:end+length(hh)) = hh(1:end);
    else
      new_txt{end+1} = txt_field{ii};
    end
  end
end