Home > classes > @miir > 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(miir)

 INPUTS:      cmd  - IIR filter object

 OUTPUTS:     miir - command string to create the IIR filter object

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

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