0001 function txt = display(varargin)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 VERSION = '$Id: display.html,v 1.7 2008/03/31 10:27:43 hewitson Exp $';
0022 CATEGORY = 'Output';
0023
0024
0025 if nargin == 2
0026 if ischar(varargin{2})
0027 in = char(varargin{2});
0028 if strcmp(in, 'Params')
0029 txt = plist();
0030 return
0031 elseif strcmp(in, 'Version')
0032 txt = VERSION;
0033 return
0034 elseif strcmp(in, 'Category')
0035 txt = CATEGORY;
0036 return
0037 end
0038 end
0039 end
0040
0041 txt = {};
0042
0043 xyzdatas = varargin{1};
0044
0045 for i=1:numel(xyzdatas)
0046 xyz = xyzdatas(i);
0047 banner = sprintf('-------- xyzdata %02d ------------', i);
0048 txt{end+1} = banner;
0049
0050 txt{end+1} = ' ';
0051
0052 xdata = get(xyz, 'x');
0053 ydata = get(xyz, 'y');
0054 zdata = get(xyz, 'z');
0055 xinfo = whos('xdata');
0056 yinfo = whos('ydata');
0057 zinfo = whos('zdata');
0058
0059 txt{end+1} = sprintf(' name: %s', get(xyz, 'name'));
0060 txt{end+1} = sprintf(' x: [%d %d], %s', xinfo.size(1), xinfo.size(2), xinfo.class);
0061 txt{end+1} = sprintf(' y: [%d %d], %s', yinfo.size(1), yinfo.size(2), yinfo.class);
0062 txt{end+1} = sprintf(' z: [%d %d], %s', zinfo.size(1), zinfo.size(2), zinfo.class);
0063 txt{end+1} = sprintf('xunits: %s', get(xyz, 'xunits'));
0064 txt{end+1} = sprintf('yunits: %s', get(xyz, 'yunits'));
0065 txt{end+1} = sprintf('zunits: %s', get(xyz, 'zunits'));
0066
0067 banner_end(1:length(banner)) = '-';
0068 txt{end+1} = banner_end;
0069
0070 txt{end+1} = ' ';
0071 txt{end+1} = ' ';
0072 end
0073
0074 if nargout == 0
0075 for ii=1:length(txt)
0076 disp(txt{ii});
0077 end
0078 end
0079
0080