0001 function txt = display(pls)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
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