CHAR convert a param object into a string. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: CHAR convert a param object into a string. CALL: string = char(fsd) INPUTS: fsd - frequency-series object OUTPUTS: string - a string which represent a frequency-series object VERSION: $Id: char.html,v 1.14 2008/03/31 10:27:36 hewitson Exp $ HISTORY: 04-02-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function pstr = char(p, varargin) 0002 % CHAR convert a param object into a string. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: CHAR convert a param object into a string. 0007 % 0008 % CALL: string = char(fsd) 0009 % 0010 % INPUTS: fsd - frequency-series object 0011 % 0012 % OUTPUTS: string - a string which represent a frequency-series object 0013 % 0014 % VERSION: $Id: char.html,v 1.14 2008/03/31 10:27:36 hewitson Exp $ 0015 % 0016 % HISTORY: 04-02-2007 M Hewitson 0017 % Creation 0018 % 0019 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0020 0021 VERSION = '$Id: char.html,v 1.14 2008/03/31 10:27:36 hewitson Exp $'; 0022 CATEGORY = 'Output'; 0023 0024 % Check if this is a call for parameters 0025 if nargin == 2 0026 if isa(p, 'fsdata') && ischar(varargin{1}) 0027 in = char(varargin{1}); 0028 if strcmp(in, 'Params') 0029 pstr = plist(); 0030 return 0031 elseif strcmp(in, 'Version') 0032 pstr = VERSION; 0033 return 0034 elseif strcmp(in, 'Category') 0035 pstr = CATEGORY; 0036 return 0037 end 0038 end 0039 end 0040 0041 pstr = get(p,'name'); 0042 0043 0044 % END