Mercurial > hg > ltpda
view m-toolbox/html_help/help/ug/param_create_content.html @ 21:8be9deffe989 database-connection-manager
Update ltpda_uo.update
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Mon, 05 Dec 2011 16:20:06 +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> — The parameter name</li> <li><tt>'val'</tt> — 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>