comparison m-toolbox/html_help/help/ug/constructor_examples_general.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>General constructor examples (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_main.html"><img src="b_prev.gif" border="0" align=
30 "bottom" alt="Constructor Examples"></a>&nbsp;&nbsp;&nbsp;<a href=
31 "constructor_examples_ao.html"><img src="b_next.gif" border="0" align=
32 "bottom" alt="Constructor examples of the AO class"></a></td>
33 </tr>
34 </table>
35
36 <h1 class="title"><a name="f3-12899" id="f3-12899"></a>General constructor examples</h1>
37 <hr>
38
39 <p>
40
41 <!-- -------------------------------------------------- -->
42 <!-- --------------- BEGIN CONTENT FILE --------------- -->
43 <!-- -------------------------------------------------- -->
44
45
46 <!-- --------------- Link box: begin --------------- -->
47 <table border="0" summary="Simple list" class="simplelist_nottable_last">
48 <tr>
49 <td>
50 <a href="#copy">Copy a LTPDA object</a>
51 </td>
52 </tr>
53 <tr>
54 <td>
55 <a href="#empty">Construct an empty LTPDA object</a>
56 </td>
57 </tr>
58 <tr>
59 <td>
60 <a href="#zero">Construct an empty LTPDA object with the size zero</a>
61 </td>
62 </tr>
63 <tr>
64 <td>
65 <a href="#file">Construct a LTPDA object by loading the object from a file</a>
66 </td>
67 </tr>
68 <tr>
69 <td>
70 <a href="#plist">Construct an LTPDA object from a parameter list object (PLIST)</a>
71 </td>
72 </tr>
73 </table>
74 <p>All here described constructors works for all LTPDAobjects.</p>
75
76 <!-- --------------- NEXT EXAMPLE --------------- -->
77
78 <hr>
79 <h2 class="title"><a name="copy"></a>Copy a LTPDA object</h2>
80 <p>The following example creates a copy of a LTPDA object (blue command) by an example of the PARFRAC object.
81 The copy constructor should work for all classes.</p>
82 <div class="fragment"><pre class="programlisting">
83 >> pf1 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], 3)
84 ---- parfrac 1 ----
85 model: None
86 res: [1;2+i*1;2-i*1]
87 poles: [6;1+i*3;1-i*3]
88 dir: 3
89 pmul: [1;1;1]
90 iunits: []
91 ounits: []
92 description:
93 UUID: 7c57ab84-3f49-486b-be49-6ed9926fbd66
94 -------------------
95 <span class="blue">>> pf2 = parfrac(pf1)</span>
96 ---- parfrac 1 ----
97 model: None
98 res: [1;2+i*1;2-i*1]
99 poles: [6;1+i*3;1-i*3]
100 dir: 3
101 pmul: [1;1;1]
102 iunits: []
103 ounits: []
104 description:
105 UUID: c892f70e-d113-407c-accc-67f988b31e7e
106 -------------------
107 </pre></div>
108 <br></br>
109 <p>REMARK: The following command copies only the handle of an object and doesn't create a copy of the object (as above). This means that everything that happens to the copy or original happens to the other object.</p>
110 <div class="fragment"><pre class="programlisting">
111 >> pf1 = parfrac()
112 ---- parfrac 1 ----
113 model: none
114 res: []
115 poles: []
116 dir: 0
117 pmul: []
118 iunits: []
119 ounits: []
120 description:
121 UUID: bd7c9c71-e633-402b-964b-0a270f80764a
122 -------------------
123 >> pf2 = pf1;
124 >> pf2.setName(<span class="string">'my new name'</span>)
125 ---- parfrac 1 ----
126 model: <span class="string">my new name</span>
127 res: []
128 poles: []
129 dir: 0
130 pmul: []
131 iunits: []
132 ounits: []
133 description:
134 UUID: 47a5e458-84fd-4d6b-beb2-11ff574ae661
135 -------------------
136 </pre></div>
137 <br></br>
138 <p>If we display pf1 again then we see that the property 'name' was changed although we only have changed pf2.</p>
139 <div class="fragment"><pre class="programlisting">
140 >> pf1
141 ---- parfrac 1 ----
142 model: <span class="string">my new name</span>
143 res: []
144 poles: []
145 dir: 0
146 pmul: []
147 iunits: []
148 ounits: []
149 description:
150 UUID: 47a5e458-84fd-4d6b-beb2-11ff574ae661
151 -------------------
152 </pre></div>
153
154 <!-- --------------- NEXT EXAMPLE --------------- -->
155
156 <hr>
157 <h2 class="title"><a name="empty"></a>Construct an empty LTPDA object</h2>
158 <p>The following example creates an empty LTPDA object by an example of a rational object.</p>
159 <div class="fragment"><pre class="programlisting">
160 >> rat = rational()
161 ---- rational 1 ----
162 model: none
163 num: []
164 den: []
165 iunits: []
166 ounits: []
167 description:
168 UUID: eb240e62-ff2f-4c31-a683-0f395b9a5242
169 --------------------
170 </pre></div>
171 <p></p>
172
173 <!-- --------------- NEXT EXAMPLE --------------- -->
174
175 <hr>
176 <h2 class="title"><a name="zero"></a>Construct an empty LTPDA object with the size zero.</h2>
177 <p>Sometimes it is necessary to create LTPDA objects which have at least one dimension of zero.
178 This mean that the MATLAB method "isempty" is true for these objects. This constructor is shown by an example of a matrix object.</p>
179 <div class="fragment"><pre class="programlisting">
180 >> m = matrix.initObjectWithSize(1,0)
181 ------ matrix -------
182 empty-object [1,0]
183 ---------------------
184 </pre></div>
185 <p>It is also possible with this constructor to create a matrix of objects with a different input as zero.</p>
186 <div class="fragment"><pre class="programlisting">
187 >> m = matrix.initObjectWithSize(2,1);
188 ---- matrix 1 ----
189 name: none
190 size: 0x0
191 description:
192 UUID: ed13da80-92a7-4d1f-8d78-a88f7d77cec3
193 ------------------
194 ---- matrix 2 ----
195 name: none
196 size: 0x0
197 description:
198 UUID: ed13da80-92a7-4d1f-8d78-a88f7d77cec3
199 ------------------
200 </pre></div>
201
202 <!-- --------------- NEXT EXAMPLE --------------- -->
203
204 <hr>
205 <h2 class="title"><a name="file"></a>Construct a LTPDA object by loading the object from a file</h2>
206 <p>The following example creates a new parfrac object by loading the object from disk.</p>
207 <div class="fragment"><pre class="programlisting">
208 pf = ao<span class="string">'parfrac_object.mat'</span>)
209 pf = ao<span class="string">'parfrac_object.xml'</span>)
210 </pre></div>
211
212 <!-- --------------- NEXT EXAMPLE --------------- -->
213
214 <hr>
215 <h2 class="title"><a name="plist"></a>Construct an LTPDA object from a parameter list object (PLIST)</h2>
216 <p>Each constructor have different sets of PLISTS which create the object in a different way.</p>
217 <table border="1" width="80%">
218 <tr>
219 <td>
220 <table border="0" cellpadding="5" class="categorylist" width="100%">
221 <colgroup>
222 <col width="37%"/>
223 <col width="63%"/>
224 </colgroup>
225 <tbody>
226 <tr valign="top">
227 <td>AO class</td>
228 <td>
229 <a href="matlab:web(ao.getInfo('ao').tohtml, '-helpbrowser')">Parameter Sets</a>
230 </td>
231 </tr>
232 <tr valign="top">
233 <td>SSM class</td>
234 <td>
235 <a href="matlab:web(ssm.getInfo('ssm').tohtml, '-helpbrowser')">Parameter Sets</a>
236 </td>
237 </tr>
238 <tr valign="top">
239 <td>SMODEL class</td>
240 <td>
241 <a href="matlab:web(smodel.getInfo('smodel').tohtml, '-helpbrowser')">Parameter Sets</a>
242 </td>
243 </tr>
244 <tr valign="top">
245 <td>TIMESPAN class</td>
246 <td>
247 <a href="matlab:web(timespan.getInfo('timespan').tohtml, '-helpbrowser')">Parameter Sets</a>
248 </td>
249 </tr>
250 <tr valign="top">
251 <td>MATRIX class</td>
252 <td>
253 <a href="matlab:web(matrix.getInfo('matrix').tohtml, '-helpbrowser')">Parameter Sets</a>
254 </td>
255 </tr>
256 <tr valign="top">
257 <td>COLLECTION class</td>
258 <td>
259 <a href="matlab:web(collection.getInfo('collection').tohtml, '-helpbrowser')">Parameter Sets</a>
260 </td>
261 </tr>
262 <tr valign="top">
263 <td>PZMODEL class</td>
264 <td>
265 <a href="matlab:web(pzmodel.getInfo('pzmodel').tohtml, '-helpbrowser')">Parameter Sets</a>
266 </td>
267 </tr>
268 <tr valign="top">
269 <td>PARFRAC class</td>
270 <td>
271 <a href="matlab:web(parfrac.getInfo('parfrac').tohtml, '-helpbrowser')">Parameter Sets</a>
272 </td>
273 </tr>
274 <tr valign="top">
275 <td>RATIONAL class</td>
276 <td>
277 <a href="matlab:web(rational.getInfo('rational').tohtml, '-helpbrowser')">Parameter Sets</a>
278 </td>
279 </tr>
280 <tr valign="top">
281 <td>FILTERBANK class</td>
282 <td>
283 <a href="matlab:web(filterbank.getInfo('filterbank').tohtml, '-helpbrowser')">Parameter Sets</a>
284 </td>
285 </tr>
286 <tr valign="top">
287 <td>MIIR class</td>
288 <td>
289 <a href="matlab:web(miir.getInfo('miir').tohtml, '-helpbrowser')">Parameter Sets</a>
290 </td>
291 </tr>
292 <tr valign="top">
293 <td>MFIR class</td>
294 <td>
295 <a href="matlab:web(mfir.getInfo('mfir').tohtml, '-helpbrowser')">Parameter Sets</a>
296 </td>
297 </tr>
298 <tr valign="top">
299 <td>PLIST class</td>
300 <td>
301 <a href="matlab:web(plist.getInfo('plist').tohtml, '-helpbrowser')">Parameter Sets</a>
302 </td>
303 </tr>
304 </tbody>
305 </table>
306 </td>
307 </tr>
308 </table>
309
310 </p>
311
312 <br>
313 <br>
314 <table class="nav" summary="Navigation aid" border="0" width=
315 "100%" cellpadding="0" cellspacing="0">
316 <tr valign="top">
317 <td align="left" width="20"><a href="constructor_examples_main.html"><img src=
318 "b_prev.gif" border="0" align="bottom" alt=
319 "Constructor Examples"></a>&nbsp;</td>
320
321 <td align="left">Constructor Examples</td>
322
323 <td>&nbsp;</td>
324
325 <td align="right">Constructor examples of the AO class</td>
326
327 <td align="right" width="20"><a href=
328 "constructor_examples_ao.html"><img src="b_next.gif" border="0" align=
329 "bottom" alt="Constructor examples of the AO class"></a></td>
330 </tr>
331 </table><br>
332
333 <p class="copy">&copy;LTP Team</p>
334 </body>
335 </html>