view m-toolbox/html_help/help/ug/param_create_content.html @ 51:9d5c88356247 database-connection-manager

Make unit tests database connection parameters configurable
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 07 Dec 2011 17:24:37 +0100
parents f0afece42f48
children
line wrap: on
line source


  <p>
	Parameter objects are used in the LTPDA Toolbox to configure the behaviour of algorithms. A
	parameter (<tt>param</tt>) object has two main properties:
	<ul>
		<li><tt>'key'</tt> &mdash; The parameter name</li>
 		<li><tt>'val'</tt> &mdash; The parameter value</li>
	</ul>
	See <a href="class_desc_param.html">param class</a> for further details. The 'key' property is always stored in upper case. The 'value' of a parameter can be any LTPDA object, as well as most standard MATLAB types.
  </p>
  <p>	
	Parameter values can take any form: vectors or matrices of numbers; strings; other objects, 
	for example a <tt>specwin</tt> (spectral window) object.
  </p>
  <p>
	Parameters are created using the <tt>param</tt> class constructor. The following code shows 
	how to create a parameter 'a' with a value of 1
  </p>
  <div class="fragment"><pre>
	>> p = param(<span class="string">'a'</span>, 1)
	---- param 1 ----
	key: a
	val: 1
	-----------------
  </pre></div>
  <p>
	The contents of a parmeter object can be accessed as follows:
  </p>
  <div class="fragment"><pre>
	>> key = p.key;  <span class="comment">% get the parameter key</span>
	>> val = p.val;  <span class="comment">% get the parameter value</span>
  </pre></div>