comparison m-toolbox/classes/@fsdata/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 fsdata object.
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3 %
4 % DESCRIPTION: DISPLAY implement terminal display for fsdata object.
5 %
6 % VERSION: $Id: display.m,v 1.20 2011/02/18 16:48:52 ingo Exp $
7 %
8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
9
10 function varargout = display(varargin)
11
12 fsdatas = [varargin{:}];
13
14 txt = {};
15
16 for i=1:numel(fsdatas)
17
18 banner_start = sprintf('----------- fsdata %02d -----------', i);
19 txt{end+1} = banner_start;
20 txt{end+1} = ' ';
21
22 txt{end+1} = sprintf(' fs: %g', fsdatas(i).fs);
23 txt{end+1} = sprintf(' x: [%d %d], %s', size(fsdatas(i).x), class(fsdatas(i).x));
24 txt{end+1} = sprintf(' y: [%d %d], %s', size(fsdatas(i).y), class(fsdatas(i).y));
25 txt{end+1} = sprintf(' dx: [%d %d], %s', size(fsdatas(i).dx), class(fsdatas(i).dx));
26 txt{end+1} = sprintf(' dy: [%d %d], %s', size(fsdatas(i).dy), class(fsdatas(i).dy));
27 txt{end+1} = sprintf('xunits: %s', char(fsdatas(i).xunits));
28 txt{end+1} = sprintf('yunits: %s', char(fsdatas(i).yunits));
29 txt{end+1} = sprintf(' t0: %s', char(fsdatas(i).t0));
30 txt{end+1} = sprintf(' navs: %g', fsdatas(i).navs);
31
32 banner_end(1:length(banner_start)) = '-';
33 txt{end+1} = banner_end;
34
35 txt{end+1} = ' ';
36 end
37
38 %%% Prepare output
39 if nargout == 0
40 for ii=1:length(txt)
41 disp(txt{ii});
42 end
43 elseif nargout == 1
44 varargout{1} = txt;
45 end
46
47 end
48