Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/builtin_models_ao_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 <p> | |
2 <ul> | |
3 <li><a href="#intro">Introduction</a></li> | |
4 <li><a href="#available">Available models</a></li> | |
5 <li><a href="#new">Adding new models</a></li> | |
6 </ul> | |
7 </p> | |
8 <h2><a name="intro">Introduction</a></h2> | |
9 <p> | |
10 Built-in Analysis Object models provide a convenient way to add parametric | |
11 contructors to the AO class. This is best explained with an example. | |
12 </p> | |
13 <p> | |
14 One of the supplied built-in models is called 'whitenoise'. To see how to | |
15 build this model, do | |
16 </p> | |
17 <div class="fragment"><pre> | |
18 >> help ao_model_whitenoise | |
19 </pre></div> | |
20 <p> | |
21 All AO model files are called <tt>ao_model_<model_name></tt>. | |
22 </p> | |
23 <p> | |
24 In this case, the help shows: | |
25 </p> | |
26 <div class="fragment"><pre> | |
27 AO_MODEL_WHITENOISE constructs a known white-noise time-series | |
28 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
29 | |
30 DESCRIPTION: AO_MODEL_WHITENOISE constructs a known white-noise time-series. | |
31 | |
32 CALL: a = ao(plist('built-in', 'whitenoise'), pl); | |
33 | |
34 INPUTS: | |
35 pl - a parameter list of additional parameters (see below) | |
36 | |
37 PARAMETERS: | |
38 'sigma' - standard deviation of the noise. [default: 1] | |
39 'nsecs' - number of seconds [s] of data. [default: 1] | |
40 'fs' - sample rate [Hz] for the white noise. [default: 10] | |
41 | |
42 | |
43 VERSION: $Id: builtin_models_ao_content.html,v 1.3 2011/04/04 10:39:35 hewitson Exp $ | |
44 | |
45 HISTORY: 29-10-08 M Hewitson | |
46 Creation | |
47 | |
48 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
49 </pre></div> | |
50 <p> | |
51 To build this model, use the following constructor: | |
52 </p> | |
53 <div class="fragment"><pre> | |
54 a = ao(plist(<span class="string">'built-in'</span>, <span class="string">'whitenoise'</span>, <span class="string">'sigma'</span>, 2, <span class="string">'nsecs'</span>, 100, <span class="string">'fs'</span>, 10)) | |
55 ----------- ao 01: WN ----------- | |
56 | |
57 name: WN | |
58 description: | |
59 data: (0,0.260207192213954) (0.1,-1.01369469442225) (0.2,-2.1763634062959) (0.3,1.00632778971068) (0.4,0.523897003913847) ... | |
60 -------- tsdata 01 ------------ | |
61 | |
62 fs: 10 | |
63 x: [1000 1], double | |
64 y: [1000 1], double | |
65 xunits: [s] | |
66 yunits: [V] | |
67 nsecs: 100 | |
68 t0: 1970-01-01 00:00:00.000 | |
69 ------------------------------- | |
70 | |
71 hist: ao / ao / $Id: builtin_models_ao_content.html,v 1.3 2011/04/04 10:39:35 hewitson Exp $-->$Id: builtin_models_ao_content.html,v 1.3 2011/04/04 10:39:35 hewitson Exp $ | |
72 mfilename: | |
73 mdlfilename: | |
74 --------------------------------- | |
75 </pre></div> | |
76 <p> | |
77 The special thing about this model, is that it always generates noise from the same seed, thus providing a reproducible data series. | |
78 </p> | |
79 | |
80 <h2><a name="available">Available models</a></h2> | |
81 | |
82 <p> | |
83 To see a list of the currently available built-in models, you can use the <tt>ao</tt> class static | |
84 method, <tt>getBuiltInModels</tt>: | |
85 </p> | |
86 <div class="fragment"><pre> | |
87 >> ao.getBuiltInModels | |
88 </pre></div> | |
89 <p> | |
90 This returns a cell-array with two columns: the first columns contains the model names; the second column descriptions of the models. | |
91 </p> | |
92 <p> | |
93 You can also do | |
94 </p> | |
95 <div class="fragment"><pre> | |
96 >> ao(plist(<span class="string">'built-in'</span>, <span class="string">''</span>)) | |
97 </pre></div> | |
98 | |
99 <h2><a name="new">Adding new models</a></h2> | |
100 | |
101 <p> | |
102 The available AO models are determined by looking through a set of directories for all M-files with names like | |
103 <tt>ao_model_<model_name></tt>. The directories to be searched depend on the installed extension modules. For more details, see | |
104 the section on <a href="extensions_intro.html">LTPDA Extension Modules</a>. | |
105 </p> | |
106 <p> | |
107 It is recommended to use the above 'whitenoise' model as an example when building your own models. | |
108 </p> | |
109 <p> | |
110 To inspect the code for this model, just edit it: | |
111 </p> | |
112 <div class="fragment"><pre> | |
113 >> edit ao_model_whitenoise | |
114 </pre></div> | |
115 |