Mercurial > hg > ltpda
comparison m-toolbox/classes/@history/display.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % DISPLAY implement terminal display for history object. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: DISPLAY implement terminal display for history object. | |
5 % | |
6 % CALL: txt = display(history) | |
7 % | |
8 % INPUT: history - history object | |
9 % | |
10 % OUTPUT: txt - cell array with strings to display the history object | |
11 % | |
12 % VERSION: $Id: display.m,v 1.19 2011/02/18 16:48:52 ingo Exp $ | |
13 % | |
14 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
15 | |
16 function varargout = display(varargin) | |
17 | |
18 hists = [varargin{:}]; | |
19 | |
20 txt = utils.helper.objdisp(hists); | |
21 | |
22 if nargout == 0 | |
23 for ii=1:length(txt) | |
24 disp(txt{ii}); | |
25 end | |
26 end | |
27 | |
28 varargout{1} = txt; | |
29 end | |
30 | |
31 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
32 % Local Functions % | |
33 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
34 | |
35 function new_txt = single_cell(txt_field) | |
36 | |
37 new_txt = {}; | |
38 for ii=1:length(txt_field) | |
39 if iscell(txt_field{ii}) | |
40 hh = single_cell(txt_field{ii}); | |
41 new_txt(end+1:end+length(hh)) = hh(1:end); | |
42 else | |
43 new_txt{end+1} = txt_field{ii}; | |
44 end | |
45 end | |
46 end | |
47 |