Home > classes > @mfir > string.m

string

PURPOSE ^

STRING writes a command string that can be used to recreate the input filter object.

SYNOPSIS ^

function cmd = string(f, varargin)

DESCRIPTION ^

 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.m,v 1.3 2007/12/10 18:07:17 ingo Exp $

 HISTORY:     29-03-2007 M Hewitson
                 Creation

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

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.m,v 1.3 2007/12/10 18:07:17 ingo Exp $
0012 %
0013 % HISTORY:     29-03-2007 M Hewitson
0014 %                 Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 VERSION  = '$Id: string.m,v 1.3 2007/12/10 18:07:17 ingo Exp $';
0019 
0020 % Check if this is a call for parameters
0021 if nargin == 2
0022   if isa(f, 'mfir') && ischar(varargin{1})
0023     in = char(varargin{1});
0024     if strcmp(in, 'Params')
0025       cmd = plist;
0026       return
0027     elseif strcmp(in, 'Version')
0028       cmd = VERSION;
0029       return
0030     end
0031   end
0032 end
0033 
0034 infile = get(f, 'infile');
0035 if ~isempty(infile)
0036   cmd = ['mfir(''' infile ''')'];
0037 else
0038   pl = get(f, 'plist');
0039   cmd = ['mfir(' string(pl) ')'];
0040 end
0041 
0042 
0043 
0044 % END

Generated on Tue 22-Jan-2008 10:39:13 by m2html © 2003