Mercurial > hg > ltpda
comparison m-toolbox/html_help/help/ug/constructor_examples_pzmodel_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 <!-- $Id: constructor_examples_pzmodel_content.html,v 1.3 2009/09/08 14:54:13 nicola Exp $ --> | |
2 | |
3 <!-- -------------------------------------------------- --> | |
4 <!-- --------------- BEGIN CONTENT FILE --------------- --> | |
5 <!-- -------------------------------------------------- --> | |
6 | |
7 <table border="0" summary="Simple list" class="simplelist_nottable_last"> | |
8 <tr> | |
9 <td> | |
10 <a href="pzmodel_model.html">General information about PZMODEL objects</a> | |
11 </td> | |
12 </tr> | |
13 <tr> | |
14 <td> | |
15 <a href="constructor_examples_pzmodel.html#empty">Construct empty PZMODEL object</a> | |
16 </td> | |
17 </tr> | |
18 <tr> | |
19 <td> | |
20 <a href="constructor_examples_pzmodel.html#xml_file">Construct a PZMODEL object by loading the object from a file</a> | |
21 </td> | |
22 </tr> | |
23 <tr> | |
24 <td> | |
25 <a href="constructor_examples_pzmodel.html#gain_poles_zeros">Construct a PZMODEL object from gain, poles and zeros</a> | |
26 </td> | |
27 </tr> | |
28 <tr> | |
29 <td> | |
30 <a href="constructor_examples_pzmodel.html#exist_model">Construct a PZMODEL object from an existing model</a> | |
31 </td> | |
32 </tr> | |
33 <tr> | |
34 <td> | |
35 <a href="constructor_examples_pzmodel.html#plist">Construct a PZMODEL object from a parameter list (PLIST) object</a> | |
36 </td> | |
37 </tr> | |
38 </table> | |
39 | |
40 <!-- --------------- NEXT EXAMPLE --------------- --> | |
41 | |
42 <hr> | |
43 <h2 class="title"><a href="pzmodel_model.html">General information about pole/zero models</a></h2> | |
44 <h2 class="title"> | |
45 <!-- --------------- NEXT EXAMPLE --------------- --> | |
46 <a href="gui_pzmodel.html">For help in designing a PZMODEL object, see also the PZMODEL Helper GUI documentation</a></h2> | |
47 <hr> | |
48 <h2 class="title"><a name="empty"></a>Construct empty PZMODEL object</h2> | |
49 <p>The following example creates an empty pzmodel object</p> | |
50 <div class="fragment"><pre class="programlisting"> | |
51 pzm = pzmodel() | |
52 ---- pzmodel 1 ---- | |
53 model: None | |
54 gain : 0 | |
55 pole 001: pole(NaN) | |
56 zero 001: zero(NaN) | |
57 ------------------- | |
58 </pre></div> | |
59 | |
60 <!-- --------------- NEXT EXAMPLE --------------- --> | |
61 | |
62 <hr> | |
63 <h2 class="title"><a name="xml_file"></a>Construct a PZMODEL object by loading the object from a file</h2> | |
64 <p>The following example creates a new pzmodel object by loading the pzmodel object from disk.</p> | |
65 <div class="fragment"><pre class="programlisting"> | |
66 p = pzmodel(<span class="string">'pzmodel.mat'</span>) | |
67 p = pzmodel(<span class="string">'pzmodel.xml'</span>) | |
68 </pre></div> | |
69 | |
70 <!-- --------------- NEXT EXAMPLE --------------- --> | |
71 | |
72 <hr> | |
73 <h2 class="title"><a name="gain_poles_zeros"></a>Construct a PZMODEL object from gain, poles and zeros</h2> | |
74 <p>The following code fragment creates a pole/zero model consisting of 2 poles and 2 zeros with a gain factor of 10:</p> | |
75 <div class="fragment"><pre class="programlisting"> | |
76 gain = 10; | |
77 poles = [pole(1,2) pole(40)]; | |
78 zeros = [zero(10,3) zero(100)]; | |
79 | |
80 pzm = pzmodel(gain, poles, zeros) | |
81 ---- pzmodel 1 ---- | |
82 model: None | |
83 gain : 10 | |
84 pole 001: pole(1,2) | |
85 pole 002: pole(40) | |
86 zero 001: zero(10,3) | |
87 zero 002: zero(100) | |
88 ------------------- | |
89 </pre></div> | |
90 <p>It is possible to give the model direct a name.</p> | |
91 <div class="fragment"><pre class="programlisting"> | |
92 gain = 10; | |
93 poles = [pole(1,2) pole(40)]; | |
94 zeros = [zero(10,3) zero(100)]; | |
95 | |
96 pzm = pzmodel(gain, poles, zeros, <span class="string">'my model name'</span>) | |
97 ---- pzmodel 1 ---- | |
98 model: <span class="string">my model name</span> | |
99 gain : 10 | |
100 pole 001: pole(1,2) | |
101 pole 002: pole(40) | |
102 zero 001: zero(10,3) | |
103 zero 002: zero(100) | |
104 ------------------- | |
105 </pre></div> | |
106 | |
107 <!-- --------------- NEXT EXAMPLE --------------- --> | |
108 | |
109 <hr> | |
110 <h2 class="title"><a name="exist_model"></a>Construct a PZMODEL object from an existing model</h2> | |
111 <p>The pzmodel constructor also accepts as an input existing models in a LISO file format</p> | |
112 <div class="fragment"><pre class="programlisting"> | |
113 pzm = pzmodel(<span class="string">'foo.fil'</span>) | |
114 </pre></div> | |
115 | |
116 <!-- --------------- NEXT EXAMPLE --------------- --> | |
117 | |
118 <hr> | |
119 <h2 class="title"><a name="plist"></a>Construct a PZMODEL object from a parameter list (PLIST) object</h2> | |
120 <p>Construct a PZMODEL from its definion. | |
121 <table border="0" summary="Simple list" class="simplelist_nottable_last" width="50%"> | |
122 <tr valign="top"> | |
123 <td width="25%"> | |
124 <p>'gain'</p> | |
125 </td> | |
126 <td width="75%"> | |
127 <p>Model gain [default: 1]</p> | |
128 </td> | |
129 </tr> | |
130 <tr valign="top"> | |
131 <td width="25%"> | |
132 <p>'poles'</p> | |
133 </td> | |
134 <td width="75%"> | |
135 <p>Vector of pole objects [default: empty pole]</p> | |
136 </td> | |
137 </tr> | |
138 <tr valign="top"> | |
139 <td width="25%"> | |
140 <p>'zeros'</p> | |
141 </td> | |
142 <td width="75%"> | |
143 <p>Vector of zero objects [default: empty zero]</p> | |
144 </td> | |
145 </tr> | |
146 <tr valign="top"> | |
147 <td width="25%"> | |
148 <p>'name'</p> | |
149 </td> | |
150 <td width="75%"> | |
151 <p>Name of model [default: 'None']</p> | |
152 </td> | |
153 </tr> | |
154 </table> | |
155 </p> | |
156 <div class="fragment"><pre class="programlisting"> | |
157 poles = [pole(0.1) pole(1,100)]; | |
158 zeros = [zero(10,3) zero(100)]; | |
159 pl = plist('name', 'my filter', 'poles', poles, 'zeros', zeros, 'gain', 10); | |
160 | |
161 pzm = pzmodel(pl) | |
162 ---- pzmodel 1 ---- | |
163 model: my filter | |
164 gain : 10 | |
165 pole 001: pole(0.1) | |
166 pole 002: pole(1,100) | |
167 zero 001: zero(10,3) | |
168 zero 002: zero(100) | |
169 ------------------- | |
170 </pre></div> | |
171 | |
172 <!-- ------------------------------------------------ --> | |
173 <!-- --------------- END CONTENT FILE --------------- --> | |
174 <!-- ------------------------------------------------ --> |