0001 function txt = display(fsdatas, varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 VERSION = '$Id: display.m,v 1.7 2008/01/08 16:39:11 ingo Exp $';
0016
0017
0018 if nargin == 2
0019 if isa(fsdatas, 'fsdata') && ischar(varargin{1})
0020 in = char(varargin{1});
0021 if strcmp(in, 'Params')
0022 txt = plist();
0023 return
0024 elseif strcmp(in, 'Version')
0025 txt = VERSION;
0026 return
0027 end
0028 end
0029 end
0030
0031 txt = {};
0032
0033 for i=1:numel(fsdatas)
0034 fsd = fsdatas(i);
0035
0036 banner_start = sprintf('----------- fsdata %02d -----------', i);
0037 txt{end+1} = banner_start;
0038 txt{end+1} = ' ';
0039
0040 xdata = get(fsd, 'x');
0041 ydata = get(fsd, 'y');
0042 xinfo = whos('xdata');
0043 yinfo = whos('ydata');
0044
0045 txt{end+1} = sprintf(' name: %s', get(fsd, 'name'));
0046 txt{end+1} = sprintf(' fs: %g', get(fsd, 'fs'));
0047 txt{end+1} = sprintf(' x: [%d %d], %s', xinfo.size(1), xinfo.size(2), xinfo.class);
0048 txt{end+1} = sprintf(' y: [%d %d], %s', yinfo.size(1), yinfo.size(2), yinfo.class);
0049 txt{end+1} = sprintf('xunits: %s', get(fsd, 'xunits'));
0050 txt{end+1} = sprintf('yunits: %s', get(fsd, 'yunits'));
0051
0052 banner_end(1:length(banner_start)) = '-';
0053 txt{end+1} = banner_end;
0054
0055 txt{end+1} = ' ';
0056 txt{end+1} = ' ';
0057 end
0058
0059 if nargout == 0
0060 for ii=1:length(txt)
0061 disp(txt{ii});
0062 end
0063 end
0064
0065