set

PURPOSE ^

SET - set model properties and return the updated object

SYNOPSIS ^

function a = set(a,varargin)

DESCRIPTION ^

SET - set model properties and return the updated object
 
   Usage:
      a = set(a,varargin)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function a = set(a,varargin)
0002 %SET - set model properties and return the updated object
0003 %
0004 %   Usage:
0005 %      a = set(a,varargin)
0006 
0007 propertyArgIn = varargin;
0008 while length(propertyArgIn) >= 2,
0009     prop = propertyArgIn{1};
0010     val = propertyArgIn{2};
0011     propertyArgIn = propertyArgIn(3:end);
0012     switch prop
0013     case 'numberofelements'
0014         a.numberofelements = val;
0015     case 'numberofgrids'
0016         a.numberofgrids = val;
0017     case 'elements'
0018         a.elements = val;
0019     case 'x'
0020         a.x = val;
0021     case 'y'
0022         a.y = val;
0023     case 'z'
0024         a.z = val;
0025     otherwise
0026         error(['set error message: ' prop,' is not a valid model property'])
0027     end
0028 end

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003