Home > classes > @plist > display.m

display

PURPOSE ^

DISPLAY display plist object.

SYNOPSIS ^

function txt = display(pls)

DESCRIPTION ^

 DISPLAY display plist object.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 DESCRIPTION: DISPLAY display plist object.

 VERSION: $Id: display.m,v 1.3 2007/11/02 14:40:05 ingo Exp $

 HISTORY: 30-01-2007 M Hewitson
             Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function txt = display(pls)
0002 % DISPLAY display plist object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: DISPLAY display plist object.
0007 %
0008 % VERSION: $Id: display.m,v 1.3 2007/11/02 14:40:05 ingo Exp $
0009 %
0010 % HISTORY: 30-01-2007 M Hewitson
0011 %             Creation
0012 %
0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0014 
0015 txt = {};
0016 
0017 pls = reshape(pls, numel(pls), 1);
0018 
0019 for ii=1:length(pls)
0020   pl = pls(ii);
0021   n  = nparams(pl);
0022   
0023   banner_start = sprintf('----------- plist %02d -----------', ii);
0024   txt{end+1} = banner_start;
0025     
0026   txt{end+1} = sprintf('n params: %d', n);
0027   params = get(pl, 'params');
0028   if n>0
0029     txt{end+1} = display(params);
0030   end
0031 
0032   txt = single_cell(txt);
0033   
0034   banner_end(1:length(banner_start)) = '-';
0035   txt{end+1} = banner_end;
0036 
0037 end
0038 
0039 if nargout == 0
0040   for ii=1:length(txt)
0041     disp(txt{ii});
0042   end
0043 end
0044 
0045 
0046 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0047 
0048 function new_txt = single_cell(txt_field)
0049 
0050 new_txt = {};
0051 for ii=1:length(txt_field)
0052   if iscell(txt_field{ii})
0053     hh = single_cell(txt_field{ii});
0054     new_txt(end+1:end+length(hh)) = hh(1:end);
0055   else
0056     new_txt{end+1} = txt_field{ii};
0057   end
0058 end
0059 
0060 % END

Generated on Fri 02-Nov-2007 19:39:27 by m2html © 2003