comparison m-toolbox/html_help/help/ug/constructor_examples_general_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_general_content.html,v 1.1 2009/09/30 21:39:43 ingo Exp $ -->
2
3 <!-- -------------------------------------------------- -->
4 <!-- --------------- BEGIN CONTENT FILE --------------- -->
5 <!-- -------------------------------------------------- -->
6
7
8 <!-- --------------- Link box: begin --------------- -->
9 <table border="0" summary="Simple list" class="simplelist_nottable_last">
10 <tr>
11 <td>
12 <a href="#copy">Copy a LTPDA object</a>
13 </td>
14 </tr>
15 <tr>
16 <td>
17 <a href="#empty">Construct an empty LTPDA object</a>
18 </td>
19 </tr>
20 <tr>
21 <td>
22 <a href="#zero">Construct an empty LTPDA object with the size zero</a>
23 </td>
24 </tr>
25 <tr>
26 <td>
27 <a href="#file">Construct a LTPDA object by loading the object from a file</a>
28 </td>
29 </tr>
30 <tr>
31 <td>
32 <a href="#plist">Construct an LTPDA object from a parameter list object (PLIST)</a>
33 </td>
34 </tr>
35 </table>
36 <p>All here described constructors works for all LTPDAobjects.</p>
37
38 <!-- --------------- NEXT EXAMPLE --------------- -->
39
40 <hr>
41 <h2 class="title"><a name="copy"></a>Copy a LTPDA object</h2>
42 <p>The following example creates a copy of a LTPDA object (blue command) by an example of the PARFRAC object.
43 The copy constructor should work for all classes.</p>
44 <div class="fragment"><pre class="programlisting">
45 >> pf1 = parfrac([1 2+1i 2-1i], [6 1+3i 1-3i], 3)
46 ---- parfrac 1 ----
47 model: None
48 res: [1;2+i*1;2-i*1]
49 poles: [6;1+i*3;1-i*3]
50 dir: 3
51 pmul: [1;1;1]
52 iunits: []
53 ounits: []
54 description:
55 UUID: 7c57ab84-3f49-486b-be49-6ed9926fbd66
56 -------------------
57 <span class="blue">>> pf2 = parfrac(pf1)</span>
58 ---- parfrac 1 ----
59 model: None
60 res: [1;2+i*1;2-i*1]
61 poles: [6;1+i*3;1-i*3]
62 dir: 3
63 pmul: [1;1;1]
64 iunits: []
65 ounits: []
66 description:
67 UUID: c892f70e-d113-407c-accc-67f988b31e7e
68 -------------------
69 </pre></div>
70 <br></br>
71 <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>
72 <div class="fragment"><pre class="programlisting">
73 >> pf1 = parfrac()
74 ---- parfrac 1 ----
75 model: none
76 res: []
77 poles: []
78 dir: 0
79 pmul: []
80 iunits: []
81 ounits: []
82 description:
83 UUID: bd7c9c71-e633-402b-964b-0a270f80764a
84 -------------------
85 >> pf2 = pf1;
86 >> pf2.setName(<span class="string">'my new name'</span>)
87 ---- parfrac 1 ----
88 model: <span class="string">my new name</span>
89 res: []
90 poles: []
91 dir: 0
92 pmul: []
93 iunits: []
94 ounits: []
95 description:
96 UUID: 47a5e458-84fd-4d6b-beb2-11ff574ae661
97 -------------------
98 </pre></div>
99 <br></br>
100 <p>If we display pf1 again then we see that the property 'name' was changed although we only have changed pf2.</p>
101 <div class="fragment"><pre class="programlisting">
102 >> pf1
103 ---- parfrac 1 ----
104 model: <span class="string">my new name</span>
105 res: []
106 poles: []
107 dir: 0
108 pmul: []
109 iunits: []
110 ounits: []
111 description:
112 UUID: 47a5e458-84fd-4d6b-beb2-11ff574ae661
113 -------------------
114 </pre></div>
115
116 <!-- --------------- NEXT EXAMPLE --------------- -->
117
118 <hr>
119 <h2 class="title"><a name="empty"></a>Construct an empty LTPDA object</h2>
120 <p>The following example creates an empty LTPDA object by an example of a rational object.</p>
121 <div class="fragment"><pre class="programlisting">
122 >> rat = rational()
123 ---- rational 1 ----
124 model: none
125 num: []
126 den: []
127 iunits: []
128 ounits: []
129 description:
130 UUID: eb240e62-ff2f-4c31-a683-0f395b9a5242
131 --------------------
132 </pre></div>
133 <p></p>
134
135 <!-- --------------- NEXT EXAMPLE --------------- -->
136
137 <hr>
138 <h2 class="title"><a name="zero"></a>Construct an empty LTPDA object with the size zero.</h2>
139 <p>Sometimes it is necessary to create LTPDA objects which have at least one dimension of zero.
140 This mean that the MATLAB method "isempty" is true for these objects. This constructor is shown by an example of a matrix object.</p>
141 <div class="fragment"><pre class="programlisting">
142 >> m = matrix.initObjectWithSize(1,0)
143 ------ matrix -------
144 empty-object [1,0]
145 ---------------------
146 </pre></div>
147 <p>It is also possible with this constructor to create a matrix of objects with a different input as zero.</p>
148 <div class="fragment"><pre class="programlisting">
149 >> m = matrix.initObjectWithSize(2,1);
150 ---- matrix 1 ----
151 name: none
152 size: 0x0
153 description:
154 UUID: ed13da80-92a7-4d1f-8d78-a88f7d77cec3
155 ------------------
156 ---- matrix 2 ----
157 name: none
158 size: 0x0
159 description:
160 UUID: ed13da80-92a7-4d1f-8d78-a88f7d77cec3
161 ------------------
162 </pre></div>
163
164 <!-- --------------- NEXT EXAMPLE --------------- -->
165
166 <hr>
167 <h2 class="title"><a name="file"></a>Construct a LTPDA object by loading the object from a file</h2>
168 <p>The following example creates a new parfrac object by loading the object from disk.</p>
169 <div class="fragment"><pre class="programlisting">
170 pf = ao<span class="string">'parfrac_object.mat'</span>)
171 pf = ao<span class="string">'parfrac_object.xml'</span>)
172 </pre></div>
173
174 <!-- --------------- NEXT EXAMPLE --------------- -->
175
176 <hr>
177 <h2 class="title"><a name="plist"></a>Construct an LTPDA object from a parameter list object (PLIST)</h2>
178 <p>Each constructor have different sets of PLISTS which create the object in a different way.</p>
179 <table border="1" width="80%">
180 <tr>
181 <td>
182 <table border="0" cellpadding="5" class="categorylist" width="100%">
183 <colgroup>
184 <col width="37%"/>
185 <col width="63%"/>
186 </colgroup>
187 <tbody>
188 <tr valign="top">
189 <td>AO class</td>
190 <td>
191 <a href="matlab:web(ao.getInfo('ao').tohtml, '-helpbrowser')">Parameter Sets</a>
192 </td>
193 </tr>
194 <tr valign="top">
195 <td>SSM class</td>
196 <td>
197 <a href="matlab:web(ssm.getInfo('ssm').tohtml, '-helpbrowser')">Parameter Sets</a>
198 </td>
199 </tr>
200 <tr valign="top">
201 <td>SMODEL class</td>
202 <td>
203 <a href="matlab:web(smodel.getInfo('smodel').tohtml, '-helpbrowser')">Parameter Sets</a>
204 </td>
205 </tr>
206 <tr valign="top">
207 <td>TIMESPAN class</td>
208 <td>
209 <a href="matlab:web(timespan.getInfo('timespan').tohtml, '-helpbrowser')">Parameter Sets</a>
210 </td>
211 </tr>
212 <tr valign="top">
213 <td>MATRIX class</td>
214 <td>
215 <a href="matlab:web(matrix.getInfo('matrix').tohtml, '-helpbrowser')">Parameter Sets</a>
216 </td>
217 </tr>
218 <tr valign="top">
219 <td>COLLECTION class</td>
220 <td>
221 <a href="matlab:web(collection.getInfo('collection').tohtml, '-helpbrowser')">Parameter Sets</a>
222 </td>
223 </tr>
224 <tr valign="top">
225 <td>PZMODEL class</td>
226 <td>
227 <a href="matlab:web(pzmodel.getInfo('pzmodel').tohtml, '-helpbrowser')">Parameter Sets</a>
228 </td>
229 </tr>
230 <tr valign="top">
231 <td>PARFRAC class</td>
232 <td>
233 <a href="matlab:web(parfrac.getInfo('parfrac').tohtml, '-helpbrowser')">Parameter Sets</a>
234 </td>
235 </tr>
236 <tr valign="top">
237 <td>RATIONAL class</td>
238 <td>
239 <a href="matlab:web(rational.getInfo('rational').tohtml, '-helpbrowser')">Parameter Sets</a>
240 </td>
241 </tr>
242 <tr valign="top">
243 <td>FILTERBANK class</td>
244 <td>
245 <a href="matlab:web(filterbank.getInfo('filterbank').tohtml, '-helpbrowser')">Parameter Sets</a>
246 </td>
247 </tr>
248 <tr valign="top">
249 <td>MIIR class</td>
250 <td>
251 <a href="matlab:web(miir.getInfo('miir').tohtml, '-helpbrowser')">Parameter Sets</a>
252 </td>
253 </tr>
254 <tr valign="top">
255 <td>MFIR class</td>
256 <td>
257 <a href="matlab:web(mfir.getInfo('mfir').tohtml, '-helpbrowser')">Parameter Sets</a>
258 </td>
259 </tr>
260 <tr valign="top">
261 <td>PLIST class</td>
262 <td>
263 <a href="matlab:web(plist.getInfo('plist').tohtml, '-helpbrowser')">Parameter Sets</a>
264 </td>
265 </tr>
266 </tbody>
267 </table>
268 </td>
269 </tr>
270 </table>