getPrmDflt

PURPOSE ^

Helper to set default values (if not already set) of parameter struct.

SYNOPSIS ^

function prm = getPrmDflt( prm, dfs )

DESCRIPTION ^

 Helper to set default values (if not already set) of parameter struct.

 Takes a struct prm and a list of 'name'/default pairs, and for each
 'name' for which prm has no value (prm.(name) is not a field)
 getPrmDflt assigns the given default value. If default value for
 variable 'name' is 'REQ', and prm.name is not a field, an error is
 thrown. See example below for usage details.

 USAGE
  prm = getPrmDflt( prm, dfs )

 INPUTS
  prm    - parameters struct
  dfs    - cell of form {name1,default1,name2,default2,...}

 OUTPUTS
  prm    - updated parameters struct

 EXAMPLE
  dfs = { 'x','REQ', 'y',0, 'z',[], 'eps',1e-3 };
  prm.x = 1;  prm = getPrmDflt( prm, dfs )

 See also

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Wed 03-Oct-2007 13:09:09 by m2html © 2003