comparison m-toolbox/html_help/help/ug/constructor_examples_ao_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_ao_content.html,v 1.7 2011/01/24 18:02:53 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="constructor_examples_ao.html#empty">Copy an AO</a>
13 </td>
14 </tr>
15 <tr>
16 <td>
17 <a href="constructor_examples_ao.html#xml_file">Construct an AO by loading the AO from a file</a>
18 </td>
19 </tr>
20 <tr>
21 <td>
22 <a href="constructor_examples_ao.html#txt_file">Construct an AO from a data file</a>
23 </td>
24 </tr>
25 <tr>
26 <td>
27 <a href="constructor_examples_ao.html#specwin">Construct an AO from spectral window</a>
28 </td>
29 </tr>
30 <tr>
31 <td>
32 <a href="constructor_examples_ao.html#plist">Construct an AO from a parameter set</a>
33 </td>
34 </tr>
35 </table>
36 <!-- --------------- Link box: end --------------- -->
37
38
39 <!-- --------------- NEXT EXAMPLE --------------- -->
40
41 <hr>
42 <h2 class="title"><a name="empty"></a>Copy an AO</h2>
43 <p>The following example creates a copy of an analysis object (blue command).</p>
44 <div class="fragment"><pre class="programlisting">
45 >> a1 = ao([1:12]);
46 <span class="blue">>> a2 = ao(1)</span>
47 ----------- ao: a -----------
48
49 name: none
50 creator: created by hewitson@bobmac.aei.uni-hannover.de[130.75.117.65] on MACI/7.6
51 description:
52 data: None
53 hist: ao / ao / $Id: ao.m,v 1.220 2009/02/25 18:51:24 ingo Exp
54 mfilename:
55 mdlfilename:
56 -----------------------------
57 </pre></div>
58 <br></br>
59 <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>
60 <div class="fragment"><pre class="programlisting">
61 >> a1 = ao()
62 ----------- ao 01: a1 -----------
63 name: none
64 description:
65 data: None
66 hist: ao / ao / $Id: ao.m,v 1.220 2009/02/25 18:51:24 ingo Exp
67 mfilename:
68 mdlfilename:
69 ---------------------------------
70 >> a2 = a1;
71 >> a2.setName(<span class="string">'my new name'</span>)
72 ----------- ao 01: my new name -----------
73 name: <span class="string">my new name</span>
74 description:
75 data: None
76 hist: ltpda_uoh / setName / $Id: ao.m,v 1.220 2009/02/25 18:51:24 ingo Exp
77 mfilename:
78 mdlfilename:
79 ------------------------------------------
80 </pre></div>
81 <br></br>
82 <p>If we display a1 again then we see that the property 'name' was changed although we only have changed a2.</p>
83 <div class="fragment"><pre class="programlisting">
84 >> a1
85 ----------- ao 01: my new name -----------
86 name: <span class="string">my new name</span>
87 description:
88 data: None
89 hist: ltpda_uoh / setName / $Id: ao.m,v 1.220 2009/02/25 18:51:24 ingo Exp
90 mfilename:
91 mdlfilename:
92 ------------------------------------------
93 </pre></div>
94
95 <!-- --------------- NEXT EXAMPLE --------------- -->
96
97 <hr>
98 <h2 class="title"><a name="xml_file"></a>Construct an AO by loading the AO from a file</h2>
99 <p>The following example creates a new analysis object by loading the analysis object from disk.</p>
100 <div class="fragment"><pre class="programlisting">
101 a = ao(<span class="string">'a1.mat'</span>)
102 a = ao(<span class="string">'a1.xml'</span>)
103 </pre></div>
104 <p>or in a <tt>PLIST</tt></p>
105 <div class="fragment"><pre class="programlisting">
106 pl = plist(<span class="string">'filename'</span>, <span class="string">'a1.xml'</span>)
107 a = ao(pl)
108 </pre></div>
109
110 <!-- --------------- NEXT EXAMPLE --------------- -->
111
112 <hr>
113 <h2 class="title"><a name="txt_file"></a>Construct an AO from a data file</h2>
114 <p>The following example creates a new analysis object by loading the data in 'file.txt'. The ascii file is assumed to be an equally sampled two-column file of time and amplitude.</p>
115 <div class="fragment"><pre class="programlisting">
116 a = ao(<span class="string">'file.txt'</span>) or
117 a = ao(<span class="string">'file.dat'</span>)
118 </pre></div>
119 <br></br>
120 <p>The following example creates a new analysis object by loading the data in 'file'. The parameter list determines how the analysis object is created. The valid key/value pairs of the parameter list are:
121 </p>
122
123 <p>
124 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
125 <colgroup>
126 <col width="25%"/>
127 <col width="75%"/>
128 </colgroup>
129 <thead>
130 <tr valign="top">
131 <th class="subcategorylist">Key</th>
132 <th class="subcategorylist">Description</th>
133 </tr>
134 </thead>
135 <tbody>
136 <tr valign="top">
137 <td>
138 <p>'type'</p>
139 </td>
140 <td>
141 <p>'tsdata','fsdata','xydata' [default: 'tsdata']</p>
142 </td>
143 </tr>
144 <tr valign="top">
145 <td>
146 <p>'fs'</p>
147 </td>
148 <td>
149 <p>If this value is set, the x-axes is computed by the fs value. [default: empty]</p>
150 </td>
151 </tr>
152 <tr valign="top">
153 <td>
154 <p>'columns'</p>
155 </td>
156 <td>
157 <p>
158 [1 2 1 4] Each pair represents the <tt>x</tt>- and <tt>y</tt>-axes (each column pair creates an analysis object).<br></br>
159 If the value 'fs' is set, then each column is converted to the <tt>y</tt> vector of a time-series AO. [default: [1 2] ]
160 </p>
161 </td>
162 </tr>
163 <tr valign="top">
164 <td>
165 <p>'comment_char'</p>
166 </td>
167 <td>
168 <p>The comment character in the file [default: '%']</p>
169 </td>
170 </tr>
171 <tr valign="top">
172 <td>
173 <p>'description'</p>
174 </td>
175 <td>
176 <p>To set the description in the analysis object</p>
177 </td>
178 </tr>
179 <tr valign="top">
180 <td>
181 <p>'...'</p>
182 </td>
183 <td>
184 <p>Every property of the data object e.g. 'name'</p>
185 </td>
186 </tr>
187 </tbody>
188 </table>
189 </p>
190
191 <div class="fragment"><pre class="programlisting">
192 <span class="comment">% Each pair in col represents the x- and y-axes.</span>
193 <span class="comment">% 'fs' is not used !!!</span>
194
195 pl = plist(<span class="string">'filename'</span>, <span class="string">'data.dat'</span>, ...
196 <span class="string">'description'</span>, <span class="string">'my ao description'</span>, ...
197 <span class="string">'type'</span>, <span class="string">'xydata'</span>, ...
198 <span class="string">'xunits'</span>, <span class="string">'s'</span>, ...
199 <span class="string">'yunits'</span>, {<span class="string">'Volt'</span>, <span class="string">'Hz'</span>}, ...
200 <span class="string">'columns'</span>, [1 2 1 3], ...
201 <span class="string">'comment_char'</span>, <span class="string">'//'</span>);
202
203 out = ao(<span class="string">'data.dat'</span>, pl);
204 out = ao(pl);
205 </pre></div>
206 <br></br>
207 <p>Another example where the time vector is specified by the sample rate (<tt>fs</tt>) and
208 each column of data is converted in to a single AO.</p>
209 <div class="fragment"><pre class="programlisting">
210 <span class="comment">% 'fs is used. As such, each column in <tt>col</tt> creates its own AO with the specified sample rate.</span>
211
212 pl = plist(<span class="string">'filename'</span>, <span class="string">'data.dat'</span>,...
213 <span class="string">'type'</span>, <span class="string">'tsdata'</span>, ...
214 <span class="string">'fs'</span>, 100, ...
215 <span class="string">'t0'</span>, {<span class="string">'14:00:00'</span>, <span class="string">'14:00:20'</span>, <span class="string">'14:00:30'</span>}, ...
216 <span class="string">'columns'</span>, [1 2 3]);
217 out = ao(<span class="string">'data.dat'</span>, pl);
218 out = ao(pl);
219 </pre></div>
220
221 <!-- --------------- NEXT EXAMPLE --------------- -->
222
223 <hr>
224 <h2 class="title"><a name="specwin"></a>Construct an AO from a spectral window</h2>
225 <p>The following example creates a cdata type AO containing the window values.</p>
226 <div class="fragment"><pre class="programlisting">
227 win = specwin(<span class="string">'Kaiser'</span>, 100, 10);
228 >> a = ao(win)
229 ----------- ao 01: Kaiser -----------
230 name: Kaiser
231 description:
232 data: 0.7145 0.7249 0.7351 0.7452 0.7551 0.7649 0.7746 0.7840 0.7934 0.8025 ...
233 -------- cdata 01 ------------
234 y: [1x100], double
235 yunits: []
236 ------------------------------
237 hist: ao / ao / $Id: fromSpecWin.m,v 1.11 2008/12/05 10:47:14 hewitson Exp -->
238 mfilename:
239 mdlfilename:
240 -------------------------------------
241 </pre></div>
242
243 <!-- --------------- NEXT EXAMPLE --------------- -->
244
245 <hr>
246 <h2 class="title"><a name="plist"></a>Construct an AO from a parameter sets</h2>
247 <p>Constructs an analysis object from the description given in the parameter list (in order of priority).</p>
248
249 <!-- --------------- Link box: begin --------------- -->
250 <table border="0" summary="Simple list" class="simplelist_nottable_last">
251 <tr>
252 <td>
253 <a href="constructor_examples_ao.html#file">From ASCII File</a>
254 </td>
255 </tr>
256 <tr>
257 <td>
258 <a href="constructor_examples_ao.html#complexfile">From complex ASCII File</a>
259 </td>
260 </tr>
261 <tr>
262 <td>
263 <a href="constructor_examples_ao.html#vals">From Values</a>
264 </td>
265 </tr>
266 <tr>
267 <td>
268 <a href="constructor_examples_ao.html#fcn">From Function</a>
269 </td>
270 </tr>
271 <tr>
272 <td>
273 <a href="constructor_examples_ao.html#xyfcn">From XY Function</a>
274 </td>
275 </tr>
276 <tr>
277 <td>
278 <a href="constructor_examples_ao.html#tsfcn">From Time-series Function</a>
279 </td>
280 </tr>
281 <tr>
282 <td>
283 <a href="constructor_examples_ao.html#fsfcn">From Frequency-series Function</a>
284 </td>
285 </tr>
286 <tr>
287 <td>
288 <a href="constructor_examples_ao.html#win">From Window</a>
289 </td>
290 </tr>
291 <tr>
292 <td>
293 <a href="constructor_examples_ao.html#waveform">From Waveform</a>
294 </td>
295 </tr>
296 <tr>
297 <td>
298 <a href="constructor_examples_ao.html#hostname">From Repository</a>
299 </td>
300 </tr>
301 <tr>
302 <td>
303 <a href="constructor_examples_ao.html#polyval">From Polynomial</a>
304 </td>
305 </tr>
306 <tr>
307 <tr>
308 <td>
309 <a href="constructor_examples_ao.html#pzmodel">From Pzmodel</a>
310 </td>
311 </tr>
312 </table>
313 <!-- --------------- Link box: end --------------- -->
314
315
316 <!-- --------------- 'file' --------------- -->
317
318 <hr>
319 <h3 class="title"><a name="file">From ASCII File</h3>
320 <p>The following example creates an analysis object from a datafile. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From ASCII File').tohtml])">here</a> to get more information about the parameters.</p>
321 <div class="fragment"><pre class="programlisting">
322
323 <span class="comment">% Construct two analysis-objects with time-series data from</span>
324 <span class="comment">% time data in the first column and the data in column 2 and 3 of the file.</span>
325 a = ao(plist(<span class="string">'filename'</span>, <span class="string">'data.txt'</span>, <span class="string">'columns'</span>, [1 2 1 3], <span class="string">'type'</span>, <span class="string">'tsdata'</span>));
326
327 <span class="comment">% Construct two analysis-objects with the given frequency and the data in column 1 and 2.</span>
328 a = ao(plist(<span class="string">'filename'</span>, <span class="string">'data.txt'</span>, <span class="string">'fs'</span>, 12.1, <span class="string">'columns'</span>, [1 2], <span class="string">'type'</span>, <span class="string">'tsdata'</span>));
329
330 <span class="comment">% Define a comment character for skip comments.</span>
331 a = ao(plist(<span class="string">'filename'</span>, <span class="string">'data.txt'</span>, <span class="string">'comment_char'</span>, <span class="string">'#'</span>, <span class="string">'columns'</span>, [1 2 1 3], <span class="string">'type'</span>, <span class="string">'tsdata'</span>));
332 </pre></div>
333
334 <!-- --------------- 'complexfile' --------------- -->
335
336 <hr>
337 <h3 class="title"><a name="complexfile">From complex ASCII File</h3>
338 <p>The following example creates an analysis object from a complex datafile. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From complex ASCII File').tohtml])">here</a> to get more information about the parameters.</p>
339 <div class="fragment"><pre class="programlisting">
340
341 a = ao(plist(<span class="string">'filename'</span>, <span class="string">'data.txt'</span>, <span class="string">'complex_type'</span>, <span class="string">'real/imag'</span>, <span class="string">'type'</span>, <span class="string">'tsdata'</span>));
342 a = ao(plist(<span class="string">'filename'</span>, <span class="string">'data.txt'</span>, <span class="string">'complex_type'</span>, <span class="string">'real/imag'</span>, <span class="string">'type'</span>, <span class="string">'fsdata'</span>, <span class="string">'columns'</span>, [1,2,4]));
343 </pre></div>
344
345 <!-- --------------- 'vals' --------------- -->
346
347 <hr>
348 <h3 class="title"><a name="vals"></a>From Values</h3>
349 <p>The following example creates an AO from a set of values. The data type depends on the parameters.
350 If you use the parameter key <b>'vals'</b> then you will get an analysis object with cdata.
351 Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Values').tohtml])">here</a> for information about the <b>value</b> parameter set or
352 <a href="matlab:web(['text://' ao.getInfo('ao', 'From XY Values').tohtml])">here</a> to get more information about the <b>xy-value</b> parameter set.
353 </p>
354 <div class="fragment"><pre class="programlisting">
355
356 <span class="comment">% cdata</span>
357 a = ao(plist(<span class="string">'vals'</span>, [1 2 3], <span class="string">'N'</span>, 10));
358
359 <span class="comment">% xydata</span>
360 a = ao(plist(<span class="string">'xvals'</span>, [1 2 3], <span class="string">'yvals'</span>, [10 20 30]));
361
362 <span class="comment">% tsdata</span>
363 a = ao(plist(<span class="string">'xvals'</span>, [1 2 3], <span class="string">'yvals'</span>, [10 20 30], <span class="string">'type'</span>, <span class="string">'tsdata'</span>));
364 a = ao(plist(<span class="string">'fs'</span>, 1, <span class="string">'yvals'</span>, [10 20 30]));
365
366 <span class="comment">% fsdata</span>
367 a = ao(plist(<span class="string">'xvals'</span>, [1 2 3], <span class="string">'yvals'</span>, [10 20 30], <span class="string">'type'</span>, <span class="string">'fsdata'</span>));
368 a = ao(plist(<span class="string">'fs'</span>, 1, <span class="string">'yvals'</span>, [10 20 30], <span class="string">'type'</span>, <span class="string">'fsdata'</span>));
369 a = ao(plist(<span class="string">'fs'</span>, 1, <span class="string">'yvals'</span>, [10 20 30], <span class="string">'type'</span>, <span class="string">'fsdata'</span>, <span class="string">'xunits'</span>, <span class="string">'mHz'</span>, <span class="string">'yunits'</span>, <span class="string">'V'</span>));
370 </pre></div>
371
372 <!-- --------------- 'fcn' --------------- -->
373
374 <hr>
375 <h3 class="title"><a name="fcn">From Function</h3>
376 <p>The following example creates an AO from the description of any valid MATLAB function.
377 The data object is of type <tt>cdata</tt>. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Function').tohtml])">here</a> to get more information about the parameters.</p>
378 <div class="fragment"><pre class="programlisting">
379
380 a = ao(plist(<span class="string">'fcn'</span>, <span class="string">'randn(100,1)'</span>));
381 </pre></div>
382 <p>You can pass additional parameters to the fcn as extra parameters in the parameter list:</p>
383 <div class="fragment"><pre class="programlisting">
384
385 a = ao(plist(<span class="string">'fcn'</span>, <span class="string">'a*b'</span>, <span class="string">'a'</span>, 2, <span class="string">'b'</span>, 1:20));
386 </pre></div>
387
388 <!-- --------------- 'xyfcn' --------------- -->
389
390 <hr>
391 <h3 class="title"><a name="xyfcn"></a>From XY Function</h3>
392 <p>Construct an AO from a function f(x) string. The data object is from type <tt>xydata</tt>. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From XY Function').tohtml])">here</a> to get more information about the parameters.</p>
393 <div class="fragment"><pre class="programlisting">
394
395 a = ao(plist(<span class="string">'xyfcn'</span>, <span class="string">'cos(2*pi*x) + randn(size(x))'</span>, <span class="string">'x'</span>, [1:1e5]));
396 a = ao(plist(<span class="string">'xyfcn'</span>, <span class="string">'log(x)'</span>, <span class="string">'x'</span>, [1:50,52:2:100,110:10:1000]));
397 </pre></div>
398
399 <!-- --------------- 'tsfcn' --------------- -->
400
401 <hr>
402 <h3 class="title"><a name="tsfcn"></a>From Time-series Function</h3>
403 <p>Construct an AO from a function of time, <tt>t</tt> f(t). The data object is from type <tt>tsdata</tt> (time-series data). Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Time-series Function').tohtml])">here</a> to get more information about the parameters.</p>
404 <div class="fragment"><pre class="programlisting">
405
406 a = ao(plist(<span class="string">'fs'</span>, 10, ...
407 <span class="string">'nsecs'</span>, 10, ...
408 <span class="string">'tsfcn'</span>, <span class="string">'sin(2*pi*1.4*t) + 0.1*randn(size(t))'</span>, ...
409 <span class="string">'t0'</span>, <span class="string">'1980-12-01 12:43:12'</span>));
410 a = ao(plist(<span class="string">'tsfcn'</span>, <span class="string">'cos(pi*t) + randn(size(t))'</span>, ...
411 <span class="string">'fs'</span>, 1, ...
412 <span class="string">'nsecs'</span>, 100));
413 a = ao(plist(<span class="string">'fs'</span>, 10, ...
414 <span class="string">'nsecs'</span>, 10, ...
415 <span class="string">'tsfcn'</span>, <span class="string">'sin(2*pi*1.4*t)+0.1*randn(size(t))'</span>, ...
416 <span class="string">'t0'</span>, time(<span class="string">'1980-12-01 12:43:12'</span>)));
417 </pre></div>
418
419 <!-- --------------- 'fsfcn' --------------- -->
420
421 <hr>
422 <h3 class="title"><a name="fsfcn"></a>From Frequency-series Function</h3>
423 <p>Construct an AO from a function of frequency, f f(f). The data object is from type <tt>fsdata</tt> (frequency-series). Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Frequency-series Function').tohtml])">here</a> to get more information about the parameters.</p>
424 <div class="fragment"><pre class="programlisting">
425
426 a = ao(plist(<span class="string">'fsfcn'</span>, <span class="string">'f'</span>, <span class="string">'f1'</span>, 1e-5, <span class="string">'f2'</span>, 1, <span class="string">'yunits'</span>, <span class="string">'V'</span>));
427 a = ao(plist(<span class="string">'fsfcn'</span>, <span class="string">'f'</span>, <span class="string">'f'</span>, [0.01:0.01:1]));
428 a = ao(plist(<span class="string">'fsfcn'</span>, <span class="string">'1./f.^2'</span>, <span class="string">'scale'</span>, <span class="string">'lin'</span>, <span class="string">'nf'</span>, 100));
429 </pre></div>
430
431 <!-- --------------- 'win' --------------- -->
432
433 <hr>
434 <h3 class="title"><a name="win"></a>From Window</h3>
435 <p>Construct an AO from a spectral window object.<br />
436 Click <a href="specwin_description.html">here</a> for a list of supported window functions and <a href="matlab:web(['text://' ao.getInfo('ao', 'From Window').tohtml])">here</a> to get more information about the parameters.</p>
437 <div class="fragment"><pre class="programlisting">
438
439 a = ao(plist(<span class="string">'win'</span>, specwin(<span class="string">'Hanning'</span>, 100)))
440 a = ao(plist(<span class="string">'win'</span>, specwin(<span class="string">'Kaiser'</span>, 10, 150)))
441 </pre></div>
442
443 <!-- --------------- 'waveform' --------------- -->
444
445 % >>
446 % >> ao(plist('waveform','noise','type','normal','sigma',2,'nsecs',1000,'fs',1));
447 % >>
448 % >>
449 % >>
450 % >>
451
452 <hr>
453 <h3 class="title"><a name="waveform"></a>From Waveform</h3>
454 <p>Construct an AO from a waveform with the following waveform types. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Waveform').tohtml])">here</a> to get more information about the parameters.</p>
455 <div class="fragment"><pre class="programlisting">
456
457 <span class="comment">% Construct random noise</span>
458 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'noise'</span>, <span class="string">'type'</span>, <span class="string">'Normal'</span>, <span class="string">'sigma'</span>, 2, <span class="string">'nsecs'</span>, 1000, <span class="string">'fs'</span>, 1));
459
460 <span class="comment">% Construct uniform random noise</span>
461 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'noise'</span>, <span class="string">'type'</span>, <span class="string">'Uniform'</span>, <span class="string">'nsecs'</span>, 1000, <span class="string">'fs'</span>, 1));
462
463 <span class="comment">% Construct a sine wave</span>
464 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'sine wave'</span>, <span class="string">'A'</span>, 3, <span class="string">'f'</span>, 1, <span class="string">'phi'</span>, pi/2, <span class="string">'toff'</span>, 0.1, <span class="string">'nsecs'</span>, 10, <span class="string">'fs'</span>, 100));
465
466 <span class="comment">% Construct a chirp waveform</span>
467 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'chirp'</span>, <span class="string">'f0'</span>, 0.1, <span class="string">'f1'</span>, 1, <span class="string">'t1'</span>, 1, <span class="string">'nsecs'</span>, 5, <span class="string">'fs'</span>, 1000));
468
469 <span class="comment">% Construct a Gaussian pulse waveform</span>
470 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'gaussian pulse'</span>, <span class="string">'f0'</span>, 1, <span class="string">'bw'</span>, 0.2, <span class="string">'nsecs'</span>, 20, <span class="string">'fs'</span>, 10));
471
472 <span class="comment">% Construct a Square wave</span>
473 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'square wave'</span>, <span class="string">'f'</span>, 2, <span class="string">'duty'</span>, 40, <span class="string">'nsecs'</span>, 10, <span class="string">'fs'</span>, 100));
474
475 <span class="comment">% Construct a Sawtooth wave</span>
476 a = ao(plist(<span class="string">'waveform'</span>, <span class="string">'sawtooth'</span>, <span class="string">'f'</span>, 1.23, <span class="string">'width'</span>, 1, <span class="string">'nsecs'</span>, 10/1.23, <span class="string">'fs'</span>, 50));
477 </pre></div>
478
479
480 <!-- --------------- 'hostname' --------------- -->
481
482 <hr>
483 <h3 class="title"><a name="hostname"></a>From Repository</h3>
484 <p>Construct an AO by retrieving it from a LTPDA repository. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Repository').tohtml])">here</a> to get more information about the parameters.</p>
485 <div class="fragment"><pre class="programlisting">
486
487 <span class="comment">% Retrieves the objects with the object ID 1..10</span>
488 a = ao(plist(<span class="string">'hostname'</span>, <span class="string">'123.123.123.123'</span>, <span class="string">'database'</span>, <span class="string">'ltpda_test'</span>, <span class="string">'ID'</span>, [1:10], <span class="string">'binary'</span>, <span class="string">'yes'</span>));
489 </pre></div>
490
491
492 <!-- --------------- 'polyval' --------------- -->
493
494 <hr>
495 <h3 class="title"><a name="polyval"></a>From Polynomial</h3>
496 <p>Construct an AO from a set of polynomial coefficients. The relevant parameters are:</p>
497 <p>
498 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
499 <colgroup>
500 <col width="25%"/>
501 <col width="75%"/>
502 </colgroup>
503 <thead>
504 <tr valign="top">
505 <th class="subcategorylist">Key</th>
506 <th class="subcategorylist">Description</th>
507 </tr>
508 </thead>
509 <tbody>
510 <tr valign="top">
511 <td>
512 <p>'polyval'</p>
513 </td>
514 <td>
515 <p>A set of polynomial coefficients. [default: [] ]</p>
516 </td>
517 </tr>
518 </tbody>
519 </table>
520 </p>
521 <p>Additional parameters:</p>
522 <p>
523 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
524 <colgroup>
525 <col width="25%"/>
526 <col width="75%"/>
527 </colgroup>
528 <thead>
529 <tr valign="top">
530 <th class="subcategorylist">Key</th>
531 <th class="subcategorylist">Description</th>
532 </tr>
533 </thead>
534 <tbody>
535 <tr valign="top">
536 <td>
537 <p>'nsecs'</p>
538 </td>
539 <td>
540 <p>Number of seconds [default: 10]</p>
541 </td>
542 </tr>
543 <tr valign="top">
544 <td>
545 <p>'fs'</p>
546 </td>
547 <td>
548 <p>Sample rate[default: 10 s]</p>
549 </td>
550 </tr>
551 </tbody>
552 </table>
553 </p>
554 <p>or</p>
555 <p>
556 <table cellspacing="0" border="0" cellpadding="2" class="simplelist_nottable_last" width="80%">
557 <colgroup>
558 <col width="25%"/>
559 <col width="75%"/>
560 </colgroup>
561 <thead>
562 <tr valign="top">
563 <th class="subcategorylist">Key</th>
564 <th class="subcategorylist">Description</th>
565 </tr>
566 </thead>
567 <tbody>
568 <tr valign="top">
569 <td>
570 <p>'t'</p>
571 </td>
572 <td>
573 <p>vector of time vertices. The value can also be an AO, in which case the X vector is used. [default: [] ]</p>
574 </td>
575 </tr>
576 </tbody>
577 </table>
578 </p>
579 Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Polynomial').tohtml])">here</a> to get more information about the parameters.
580 <div class="fragment"><pre class="programlisting">
581
582 a = ao(plist(<span class="string">'polyval'</span>, [1 2 3], <span class="string">'Nsecs'</span>, 10, <span class="string">'fs'</span>, 10));
583 </pre></div>
584
585
586 <!-- --------------- 'pzmodel' --------------- -->
587
588 <hr>
589 <h3 class="title"><a name="pzmodel"></a>From Pzmodel</h3>
590 <p>Generates an AO with a timeseries with a prescribed spectrum. Click <a href="matlab:web(['text://' ao.getInfo('ao', 'From Pzmodel').tohtml])">here</a> to get more information about the parameters.</p>
591 <div class="fragment"><pre class="programlisting">
592
593 p = [pz(1,2) pz(10)]
594 z = [pz(4)]
595 pzm = pzmodel(1, p, z)
596
597 fs = 10
598 nsecs = 100
599 a = ao(plist(<span class="string">'pzmodel'</span>, pzm, <span class="string">'Nsecs'</span>, nsecs, <span class="string">'Fs'</span>, fs));
600 </pre></div>
601
602
603 <!-- ------------------------------------------------ -->
604 <!-- --------------- END CONTENT FILE --------------- -->
605 <!-- ------------------------------------------------ -->