0001 function pstr = string(pl)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018 np = length(pl.params);
0019 pstr = '';
0020 if np > 0
0021 pstr = ['plist('];
0022 for j=1:np
0023 p = pl.params(j);
0024 if ischar(p.val)
0025 pstr = [pstr '''' p.key ''', ''' char(p.val) ''', '];
0026 elseif isnumeric(p.val)
0027 pstr = [pstr '''' p.key ''', [' num2str(p.val) '], '];
0028 elseif isa(p.val, 'specwin')
0029 pstr = [pstr '''' p.key ''', ' string(p.val) ', '];
0030 elseif isa(p.val, 'miir')
0031 pstr = [pstr '''' p.key ''', ' string(p.val) ', '];
0032 elseif isa(p.val, 'pole') || isa(p.val, 'zero') || isa(p.val, 'pzmodel')
0033 pstr = [pstr '''' p.key ''', ' string(p.val) ', '];
0034 elseif isa(p.val, 'time')
0035 pstr = [pstr '''' p.key ''', ' string(p.val) ', '];
0036 else
0037 warning('!!! unknown parameter type. Can''t convert to string.');
0038 end
0039 end
0040
0041
0042 if ~isempty(pstr)
0043 pstr = pstr(1:end-2);
0044 end
0045 pstr = [pstr ')'];
0046 end
0047
0048
0049
0050