Home > classes > @pole > string.m

string

PURPOSE ^

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

SYNOPSIS ^

function cmd = string(ps)

DESCRIPTION ^

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

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

 DESCRIPTION: STRING writes a command string that can be used to recreate the
              input pole object.

 CALL:        cmd = string(pole);

 VERSION:     $Id: string.m,v 1.4 2007/10/22 12:05:16 ingo Exp $

 HISTORY:     02-04-2007 M Hewitson
                 Creation

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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function cmd = string(ps)
0002 % STRING writes a command string that can be used to recreate the input pole object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: STRING writes a command string that can be used to recreate the
0007 %              input pole object.
0008 %
0009 % CALL:        cmd = string(pole);
0010 %
0011 % VERSION:     $Id: string.m,v 1.4 2007/10/22 12:05:16 ingo Exp $
0012 %
0013 % HISTORY:     02-04-2007 M Hewitson
0014 %                 Creation
0015 %
0016 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0017 
0018 cmd = '[';
0019 for j=1:length(ps)
0020   p = ps(j);
0021 
0022   pl = plist();
0023   fields = fieldnames(p);
0024   for ii = 1:length(fields)
0025     field = fields{ii};
0026     if strcmp(field, 'ri')
0027       % do not add this field to the parametr list
0028     else
0029       pl = append(pl, field, p.(field));
0030     end
0031   end
0032 
0033   cmd = [cmd ' pole(' string(pl) ')'];
0034 end
0035 cmd = [cmd ']'];
0036 
0037 % END

Generated on Thu 01-Nov-2007 09:42:34 by m2html © 2003