


CHAR convert a pole object into a string.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DESCRIPTION: CHAR convert a pole object into a string.
CALL: string = char(pole);
VERSION: $Id: char.m,v 1.3 2008/01/02 17:58:51 ingo Exp $
HISTORY: 02-04-2007 M Hewitson
Creation
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

0001 function pstr = char(p, varargin) 0002 % CHAR convert a pole object into a string. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: CHAR convert a pole object into a string. 0007 % 0008 % CALL: string = char(pole); 0009 % 0010 % VERSION: $Id: char.m,v 1.3 2008/01/02 17:58:51 ingo Exp $ 0011 % 0012 % HISTORY: 02-04-2007 M Hewitson 0013 % Creation 0014 % 0015 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0016 0017 VERSION = '$Id: char.m,v 1.3 2008/01/02 17:58:51 ingo Exp $'; 0018 0019 % Check if this is a call for parameters 0020 if nargin == 2 0021 if isa(p, 'pole') && ischar(varargin{1}) 0022 in = char(varargin{1}); 0023 if strcmp(in, 'Params') 0024 pstr = plist; 0025 return 0026 elseif strcmp(in, 'Version') 0027 pstr = VERSION; 0028 return 0029 end 0030 end 0031 end 0032 0033 pstr = ['pole(' num2str(p.f)]; 0034 if p.q > 0.5 0035 pstr = [pstr ',' num2str(p.q)]; 0036 end 0037 pstr = [pstr ')']; 0038 0039 pstr = strrep(pstr, '_', '\_'); 0040 0041 % END