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