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.4 2008/02/12 22:46:55 hewitson 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.4 2008/02/12 22:46:55 hewitson Exp $
0016 %
0017 % HISTORY:     29-03-2007 M Hewitson
0018 %                 Creation
0019 %
0020 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0021 
0022 VERSION  = '$Id: string.m,v 1.4 2008/02/12 22:46:55 hewitson Exp $';
0023 CATEGORY = 'Output';
0024 
0025 % Check if this is a call for parameters
0026 if nargin == 2
0027   if isa(f, 'miir') && ischar(varargin{1})
0028     in = char(varargin{1});
0029     if strcmp(in, 'Params')
0030       cmd = plist;
0031       return
0032     elseif strcmp(in, 'Version')
0033       cmd = VERSION;
0034       return
0035     elseif strcmp(in, 'Category')
0036       cmd = CATEGORY;
0037       return
0038     end
0039   end
0040 end
0041 
0042 infile = get(f, 'infile');
0043 if ~isempty(infile)
0044   cmd = ['miir(''' infile ''')'];
0045 else
0046   pl = get(f, 'plist');
0047   cmd = ['miir(' string(pl) ')'];
0048 end
0049 
0050 
0051 
0052 % END

Generated on Mon 31-Mar-2008 13:54:54 by m2html © 2003