Mercurial > hg > ltpda
comparison m-toolbox/classes/@cdata/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 cdata object. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: DISPLAY implement terminal display for cdata object. | |
5 % | |
6 % VERSION: $Id: display.m,v 1.19 2011/02/18 16:48:51 ingo Exp $ | |
7 % | |
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9 | |
10 function varargout = display(varargin) | |
11 | |
12 cdatas = [varargin{:}]; | |
13 | |
14 txt = {}; | |
15 | |
16 for i=1:numel(cdatas) | |
17 banner = sprintf('-------- cdata %02d ------------', i); | |
18 txt{end+1} = banner; | |
19 | |
20 txt{end+1} = sprintf(' y: [%dx%d], %s', size(cdatas(i).y), class(cdatas(i).y)); | |
21 txt{end+1} = sprintf(' dy: [%dx%d], %s', size(cdatas(i).dy), class(cdatas(i).y)); | |
22 txt{end+1} = sprintf('yunits: %s', char(cdatas(i).yunits)); | |
23 | |
24 banner_end(1:length(banner)) = '-'; | |
25 txt{end+1} = banner_end; | |
26 | |
27 txt{end+1} = ' '; | |
28 end | |
29 | |
30 if nargout == 0 | |
31 for ii=1:length(txt) | |
32 disp(txt{ii}); | |
33 end | |
34 end | |
35 | |
36 varargout{1} = txt; | |
37 end | |
38 |