Home > classes > @zero > string.m

string

PURPOSE ^

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

SYNOPSIS ^

function cmd = string(ps)

DESCRIPTION ^

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

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

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

 CALL:        cmd = string (zero);

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

 HISTORY:     02-04-2007 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 zero object.
0003 %
0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0005 %
0006 % DESCRIPTION: STRING writes a command string that can be used to recreate the
0007 %              input zero object.
0008 %
0009 % CALL:        cmd = string (zero);
0010 %
0011 % VERSION:     $Id: string.m,v 1.4 2007/10/22 12:07:55 ingo Exp $
0012 %
0013 % HISTORY:     02-04-2007 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 ' zero(' string(pl) ')'];
0034 end
0035 cmd = [cmd ']'];
0036 
0037 
0038 % END

Generated on Fri 02-Nov-2007 19:39:27 by m2html © 2003