STRING writes a command string that can be used to recreate the input filter object. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: STRING writes a command string that can be used to recreate the input filter object. CALL: cmd = string(mfir) VERSION: $Id: string.html,v 1.14 2008/03/31 10:27:39 hewitson Exp $ HISTORY: 29-03-2007 M Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function cmd = string(f, varargin) 0002 % STRING writes a command string that can be used to recreate the input filter object. 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: STRING writes a command string that can be used to recreate the 0007 % input filter object. 0008 % 0009 % CALL: cmd = string(mfir) 0010 % 0011 % VERSION: $Id: string.html,v 1.14 2008/03/31 10:27:39 hewitson Exp $ 0012 % 0013 % HISTORY: 29-03-2007 M Hewitson 0014 % Creation 0015 % 0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0017 0018 VERSION = '$Id: string.html,v 1.14 2008/03/31 10:27:39 hewitson Exp $'; 0019 CATEGORY = 'Helper'; 0020 0021 % Check if this is a call for parameters 0022 if nargin == 2 0023 if isa(f, 'mfir') && ischar(varargin{1}) 0024 in = char(varargin{1}); 0025 if strcmp(in, 'Params') 0026 cmd = plist; 0027 return 0028 elseif strcmp(in, 'Version') 0029 cmd = VERSION; 0030 return 0031 elseif strcmp(in, 'Category') 0032 cmd = CATEGORY; 0033 return 0034 end 0035 end 0036 end 0037 0038 infile = get(f, 'infile'); 0039 if ~isempty(infile) 0040 cmd = ['mfir(''' infile ''')']; 0041 else 0042 pl = get(f, 'plist'); 0043 cmd = ['mfir(' string(pl) ')']; 0044 end 0045 0046 0047 0048 % END