DISPLAY display plist object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: DISPLAY display plist object. VERSION: $Id: display.m,v 1.2 2007/06/18 16:41:22 ingo Exp $ HISTORY: 30-01-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function txt = display(pl) 0002 % DISPLAY display plist object. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: DISPLAY display plist object. 0007 % 0008 % VERSION: $Id: display.m,v 1.2 2007/06/18 16:41:22 ingo Exp $ 0009 % 0010 % HISTORY: 30-01-2007 M Hewitson 0011 % Creation 0012 % 0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0014 0015 txt = {}; 0016 n = nparams(pl); 0017 0018 txt{end+1} = sprintf('n params: %d', n); 0019 params = get(pl, 'params'); 0020 if n>0 0021 txt{end+1} = display(params); 0022 end 0023 0024 txt = single_cell(txt); 0025 0026 if nargout == 0 0027 for ii=1:length(txt) 0028 disp(txt{ii}); 0029 end 0030 end 0031 0032 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0033 0034 function new_txt = single_cell(txt_field) 0035 0036 new_txt = {}; 0037 for ii=1:length(txt_field) 0038 if iscell(txt_field{ii}) 0039 hh = single_cell(txt_field{ii}); 0040 new_txt(end+1:end+length(hh)) = hh(1:end); 0041 else 0042 new_txt{end+1} = txt_field{ii}; 0043 end 0044 end 0045 0046 % END