Mercurial > hg > ltpda
view m-toolbox/classes/@history/display.m @ 40:977eb37f31cb database-connection-manager
User friendlier errors from utils.mysql.connect
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 18:04:03 +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