comparison m-toolbox/classes/@history/char.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 % CHAR convert a param object into a string.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: CHAR convert a history object into a string.
5 %
6 % CALL: string = char(hist)
7 %
8 % VERSION: $Id: char.m,v 1.14 2011/02/18 16:48:52 ingo Exp $
9 %
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 function varargout = char(varargin)
13
14 objs = [varargin{:}];
15
16 hstr = '';
17
18 for ii = 1:numel(objs)
19 cl = getObjectClass(objs(ii));
20 if ~isempty(cl)
21 str = sprintf('%s.hist', cl);
22 else
23 str = sprintf('empty-history');
24 end
25 hstr = [hstr str ' / '];
26 end
27
28 hstr = hstr(1:end-2);
29
30 varargout{1} = hstr;
31 end
32