comparison m-toolbox/html_help/help/ug/param_create_content.html @ 0:f0afece42f48

Import.
author Daniele Nicolodi <nicolodi@science.unitn.it>
date Wed, 23 Nov 2011 19:22:13 +0100
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f0afece42f48
1
2 <p>
3 Parameter objects are used in the LTPDA Toolbox to configure the behaviour of algorithms. A
4 parameter (<tt>param</tt>) object has two main properties:
5 <ul>
6 <li><tt>'key'</tt> &mdash; The parameter name</li>
7 <li><tt>'val'</tt> &mdash; The parameter value</li>
8 </ul>
9 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.
10 </p>
11 <p>
12 Parameter values can take any form: vectors or matrices of numbers; strings; other objects,
13 for example a <tt>specwin</tt> (spectral window) object.
14 </p>
15 <p>
16 Parameters are created using the <tt>param</tt> class constructor. The following code shows
17 how to create a parameter 'a' with a value of 1
18 </p>
19 <div class="fragment"><pre>
20 >> p = param(<span class="string">'a'</span>, 1)
21 ---- param 1 ----
22 key: a
23 val: 1
24 -----------------
25 </pre></div>
26 <p>
27 The contents of a parmeter object can be accessed as follows:
28 </p>
29 <div class="fragment"><pre>
30 >> key = p.key; <span class="comment">% get the parameter key</span>
31 >> val = p.val; <span class="comment">% get the parameter value</span>
32 </pre></div>
33