Mercurial > hg > ltpda
comparison m-toolbox/classes/@plotter/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 display a plotter object. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: DISPLAY display a plotter object. | |
5 % | |
6 % VERSION: $Id: display.m,v 1.2 2010/12/12 08:29:00 hewitson Exp $ | |
7 % | |
8 % HISTORY: 08-12-2010 M Hewitson | |
9 % Creation | |
10 % | |
11 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
12 | |
13 function varargout = display(varargin) | |
14 | |
15 % Get minfo objects | |
16 objs = utils.helper.collect_objects(varargin(:), 'plotter'); | |
17 | |
18 % get display text | |
19 % txt = char(objs); | |
20 | |
21 txt = []; | |
22 for ii = 1:numel(objs) | |
23 | |
24 pp = objs(ii); | |
25 | |
26 pstr = 'data: '; | |
27 | |
28 % data class | |
29 N = numel(pp.data); | |
30 for kk=1:N | |
31 d = pp.data{kk}; | |
32 if isa(d, 'ao') | |
33 pstr = [pstr sprintf('%s [%s/%s]', d.name, class(d), class(d.data))]; | |
34 else | |
35 pstr = [pstr sprintf('%s [%s]', d.name, class(d))]; | |
36 end | |
37 if kk< N | |
38 pstr = [pstr ', ']; | |
39 end | |
40 end | |
41 | |
42 txt = [txt {pstr}]; | |
43 | |
44 end | |
45 | |
46 % txt = utils.helper.objdisp(objs); | |
47 | |
48 % display the objects | |
49 if nargout > 0 | |
50 varargout{1} = txt; | |
51 elseif nargout == 0; | |
52 for j=1:numel(txt) | |
53 disp(txt{j}); | |
54 end | |
55 end | |
56 end | |
57 |