comparison m-toolbox/html_help/help/ug/constructor_examples_pzmodel.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 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
3
4 <html lang="en">
5 <head>
6 <meta name="generator" content=
7 "HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org">
8 <meta http-equiv="Content-Type" content=
9 "text/html; charset=us-ascii">
10
11 <title>Constructor examples of the PZMODEL class (LTPDA Toolbox)</title>
12 <link rel="stylesheet" href="docstyle.css" type="text/css">
13 <meta name="generator" content="DocBook XSL Stylesheets V1.52.2">
14 <meta name="description" content=
15 "Presents an overview of the features, system requirements, and starting the toolbox.">
16 </head>
17
18 <body>
19 <a name="top_of_page" id="top_of_page"></a>
20
21 <p style="font-size:1px;">&nbsp;</p>
22
23 <table class="nav" summary="Navigation aid" border="0" width=
24 "100%" cellpadding="0" cellspacing="0">
25 <tr>
26 <td valign="baseline"><b>LTPDA Toolbox</b></td><td><a href="../helptoc.html">contents</a></td>
27
28 <td valign="baseline" align="right"><a href=
29 "constructor_examples_miir.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Constructor examples of the MIIR class"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "constructor_examples_parfrac.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Constructor examples of the PARFRAC class"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>Constructor examples of the PZMODEL class</h1>
37 <hr>
38
39 <p>
40
41 <!-- -------------------------------------------------- -->
42 <!-- --------------- BEGIN CONTENT FILE --------------- -->
43 <!-- -------------------------------------------------- -->
44
45 <table border="0" summary="Simple list" class="simplelist_nottable_last">
46 <tr>
47 <td>
48 <a href="pzmodel_model.html">General information about PZMODEL objects</a>
49 </td>
50 </tr>
51 <tr>
52 <td>
53 <a href="constructor_examples_pzmodel.html#empty">Construct empty PZMODEL object</a>
54 </td>
55 </tr>
56 <tr>
57 <td>
58 <a href="constructor_examples_pzmodel.html#xml_file">Construct a PZMODEL object by loading the object from a file</a>
59 </td>
60 </tr>
61 <tr>
62 <td>
63 <a href="constructor_examples_pzmodel.html#gain_poles_zeros">Construct a PZMODEL object from gain, poles and zeros</a>
64 </td>
65 </tr>
66 <tr>
67 <td>
68 <a href="constructor_examples_pzmodel.html#exist_model">Construct a PZMODEL object from an existing model</a>
69 </td>
70 </tr>
71 <tr>
72 <td>
73 <a href="constructor_examples_pzmodel.html#plist">Construct a PZMODEL object from a parameter list (PLIST) object</a>
74 </td>
75 </tr>
76 </table>
77
78 <!-- --------------- NEXT EXAMPLE --------------- -->
79
80 <hr>
81 <h2 class="title"><a href="pzmodel_model.html">General information about pole/zero models</a></h2>
82 <h2 class="title">
83 <!-- --------------- NEXT EXAMPLE --------------- -->
84 <a href="gui_pzmodel.html">For help in designing a PZMODEL object, see also the PZMODEL Helper GUI documentation</a></h2>
85 <hr>
86 <h2 class="title"><a name="empty"></a>Construct empty PZMODEL object</h2>
87 <p>The following example creates an empty pzmodel object</p>
88 <div class="fragment"><pre class="programlisting">
89 pzm = pzmodel()
90 ---- pzmodel 1 ----
91 model: None
92 gain : 0
93 pole 001: pole(NaN)
94 zero 001: zero(NaN)
95 -------------------
96 </pre></div>
97
98 <!-- --------------- NEXT EXAMPLE --------------- -->
99
100 <hr>
101 <h2 class="title"><a name="xml_file"></a>Construct a PZMODEL object by loading the object from a file</h2>
102 <p>The following example creates a new pzmodel object by loading the pzmodel object from disk.</p>
103 <div class="fragment"><pre class="programlisting">
104 p = pzmodel(<span class="string">'pzmodel.mat'</span>)
105 p = pzmodel(<span class="string">'pzmodel.xml'</span>)
106 </pre></div>
107
108 <!-- --------------- NEXT EXAMPLE --------------- -->
109
110 <hr>
111 <h2 class="title"><a name="gain_poles_zeros"></a>Construct a PZMODEL object from gain, poles and zeros</h2>
112 <p>The following code fragment creates a pole/zero model consisting of 2 poles and 2 zeros with a gain factor of 10:</p>
113 <div class="fragment"><pre class="programlisting">
114 gain = 10;
115 poles = [pole(1,2) pole(40)];
116 zeros = [zero(10,3) zero(100)];
117
118 pzm = pzmodel(gain, poles, zeros)
119 ---- pzmodel 1 ----
120 model: None
121 gain : 10
122 pole 001: pole(1,2)
123 pole 002: pole(40)
124 zero 001: zero(10,3)
125 zero 002: zero(100)
126 -------------------
127 </pre></div>
128 <p>It is possible to give the model direct a name.</p>
129 <div class="fragment"><pre class="programlisting">
130 gain = 10;
131 poles = [pole(1,2) pole(40)];
132 zeros = [zero(10,3) zero(100)];
133
134 pzm = pzmodel(gain, poles, zeros, <span class="string">'my model name'</span>)
135 ---- pzmodel 1 ----
136 model: <span class="string">my model name</span>
137 gain : 10
138 pole 001: pole(1,2)
139 pole 002: pole(40)
140 zero 001: zero(10,3)
141 zero 002: zero(100)
142 -------------------
143 </pre></div>
144
145 <!-- --------------- NEXT EXAMPLE --------------- -->
146
147 <hr>
148 <h2 class="title"><a name="exist_model"></a>Construct a PZMODEL object from an existing model</h2>
149 <p>The pzmodel constructor also accepts as an input existing models in a LISO file format</p>
150 <div class="fragment"><pre class="programlisting">
151 pzm = pzmodel(<span class="string">'foo.fil'</span>)
152 </pre></div>
153
154 <!-- --------------- NEXT EXAMPLE --------------- -->
155
156 <hr>
157 <h2 class="title"><a name="plist"></a>Construct a PZMODEL object from a parameter list (PLIST) object</h2>
158 <p>Construct a PZMODEL from its definion.
159 <table border="0" summary="Simple list" class="simplelist_nottable_last" width="50%">
160 <tr valign="top">
161 <td width="25%">
162 <p>'gain'</p>
163 </td>
164 <td width="75%">
165 <p>Model gain [default: 1]</p>
166 </td>
167 </tr>
168 <tr valign="top">
169 <td width="25%">
170 <p>'poles'</p>
171 </td>
172 <td width="75%">
173 <p>Vector of pole objects [default: empty pole]</p>
174 </td>
175 </tr>
176 <tr valign="top">
177 <td width="25%">
178 <p>'zeros'</p>
179 </td>
180 <td width="75%">
181 <p>Vector of zero objects [default: empty zero]</p>
182 </td>
183 </tr>
184 <tr valign="top">
185 <td width="25%">
186 <p>'name'</p>
187 </td>
188 <td width="75%">
189 <p>Name of model [default: 'None']</p>
190 </td>
191 </tr>
192 </table>
193 </p>
194 <div class="fragment"><pre class="programlisting">
195 poles = [pole(0.1) pole(1,100)];
196 zeros = [zero(10,3) zero(100)];
197 pl = plist('name', 'my filter', 'poles', poles, 'zeros', zeros, 'gain', 10);
198
199 pzm = pzmodel(pl)
200 ---- pzmodel 1 ----
201 model: my filter
202 gain : 10
203 pole 001: pole(0.1)
204 pole 002: pole(1,100)
205 zero 001: zero(10,3)
206 zero 002: zero(100)
207 -------------------
208 </pre></div>
209
210 <!-- ------------------------------------------------ -->
211 <!-- --------------- END CONTENT FILE --------------- -->
212 <!-- ------------------------------------------------ -->
213
214 </p>
215
216 <br>
217 <br>
218 <table class="nav" summary="Navigation aid" border="0" width=
219 "100%" cellpadding="0" cellspacing="0">
220 <tr valign="top">
221 <td align="left" width="20"><a href="constructor_examples_miir.html"><img src=
222 "b_prev.gif" border="0" align="bottom" alt=
223 "Constructor examples of the MIIR class"></a>&nbsp;</td>
224
225 <td align="left">Constructor examples of the MIIR class</td>
226
227 <td>&nbsp;</td>
228
229 <td align="right">Constructor examples of the PARFRAC class</td>
230
231 <td align="right" width="20"><a href=
232 "constructor_examples_parfrac.html"><img src="b_next.gif" border="0" align=
233 "bottom" alt="Constructor examples of the PARFRAC class"></a></td>
234 </tr>
235 </table><br>
236
237 <p class="copy">&copy;LTP Team</p>
238 </body>
239 </html>