Mercurial > hg > ltpda
comparison m-toolbox/test/MPipeline/example_1.lwb @ 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 <?xml version="1.0" encoding="utf-8"?> | |
2 <LTPDAworkbench filepath="/Users/hewitson/working/ltp/ltpda/software/m-toolbox/test/MPipeline/example_1.lwb" name="example_1.lwb"> | |
3 <document name="example 1" parentDiag="" visible="true" windowHeight="624" windowState="maximized" windowWidth="718" windowX="0" windowY="0" zoomFactor="1.9487172"> | |
4 <block bounds="3 31 60 64" inputs="1" name="ao plist" outputs="1"> | |
5 <LTPDAalgorithm mcategory="Constructor" mclass="plist" mname="plist" mpackage="" mversion="" portdims="1 10 1 10"> | |
6 <HelpText> PLIST Plist class object constructor. | |
7 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
8 | |
9 DESCRIPTION: PLIST Parameter-List Object class object constructor. | |
10 Create a plist object. | |
11 | |
12 SUPER CLASSES: ltpda_uo < ltpda_obj | |
13 | |
14 PROPERTIES: | |
15 | |
16 Inherit Properties (read only) | |
17 name - name of object | |
18 created - creation time (time-object) | |
19 prov - contains a instance of the provenance class. | |
20 hist - history of the object (history object) | |
21 version - cvs-version string. | |
22 | |
23 Protected Properties (read only) | |
24 params - list of param-objects | |
25 | |
26 PLIST METHODS: | |
27 | |
28 Defined Abstract methods: | |
29 char - returns one character string which represents the object | |
30 copy - copies an object | |
31 display - displays an object | |
32 string - converts an object to a command string which will | |
33 recreate the plist object. | |
34 update_struct - updates a object structure to the current tbx-version | |
35 | |
36 Public methods: | |
37 append - append a param-object, plist-object or a key/value pair to | |
38 the parameter list. | |
39 combine - combine multiple parameter lists (plist objects) into a | |
40 single plist. | |
41 find - Returns the value corresponding to the first parameters in | |
42 the list with search-key. | |
43 isparam - look for a given key in the parameter lists. | |
44 nparams - returns the number of param objects in the list. | |
45 pset - set or add a key/value pairor a param-object into | |
46 the parameter list. | |
47 pzmresp - shadow function for the pzmodel/resp. | |
48 remove - remove a parameter from the parameter list. | |
49 resp - shadows miir/iirResp and pzmodel/resp. | |
50 | |
51 CONSTRUCTORS: | |
52 | |
53 pl = plist() - create an empty plist object. | |
54 pl = plist(p) - create a plist with elements p | |
55 where p is an array of param objects. | |
56 pl = plist('key', val) - create a plist with the key/value pair | |
57 pl = plist('key1', val1, ... - create a plist with more key/value pairs | |
58 'key2', 'val2') | |
59 pl = plist('file.xml') - load a plist-object from xml-file | |
60 pl = plist('file.mat') - load a plist-object from mat-file | |
61 pl = plist(pl) - copies the input plist. | |
62 | |
63 PARAMETERS: | |
64 | |
65 If no recognised parameters are found in the input plist, the input | |
66 plist is simply returned. This is the copy constructor. | |
67 | |
68 'Hostname' - construct a plist by retrieving it from an LTPDA repository | |
69 specified by the given hostname. Only those objects which | |
70 are plists are returned. | |
71 Additional parameters: | |
72 'Database' - The database name [default: 'ltpda'] | |
73 'ID' - A vector of object IDs. | |
74 'CID' - Retrieve all plists from a particular | |
75 collection. | |
76 'Binary' - Set to 'yes' to retrieve from stored binary | |
77 representation (not always available). | |
78 | |
79 M-FILE INFO: The following call returns an minfo object that contains | |
80 information about the plist constructor: | |
81 >> info = plist.getInfo | |
82 or >> info = plist.getInfo('plist') | |
83 | |
84 You can get information about class methods by calling: | |
85 >> info = plist.getInfo(method) | |
86 e.g. >> info = plist.getInfo('eq') | |
87 | |
88 You can also restrict the sets of parameters contained in | |
89 the minfo object by calling: | |
90 >> info = plist.getInfo(method, set) | |
91 e.g. >> info = plist.getInfo('plist', 'Default') | |
92 | |
93 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
94 | |
95 HISTORY: 30-01-07 M Hewitson | |
96 Creation | |
97 | |
98 SEE ALSO: ltpda_obj, ltpda_uo, param | |
99 | |
100 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
101 </HelpText> | |
102 <sets> | |
103 <set name="Default"/> | |
104 <set name="From Repository"/> | |
105 <set name="From MAT File"/> | |
106 </sets> | |
107 <plists> | |
108 <plist name="none"> | |
109 <param> | |
110 <key>Nsecs</key> | |
111 <val>100</val> | |
112 <type>Char</type> | |
113 </param> | |
114 <param> | |
115 <key>fs</key> | |
116 <val>10</val> | |
117 <type>Char</type> | |
118 </param> | |
119 <param> | |
120 <key>tsfcn</key> | |
121 <val>randn(size(t))</val> | |
122 <type>Char</type> | |
123 </param> | |
124 </plist> | |
125 <plist name="none"> | |
126 <param> | |
127 <key>HOSTNAME</key> | |
128 <val>localhost</val> | |
129 <type>char</type> | |
130 </param> | |
131 <param> | |
132 <key>DATABASE</key> | |
133 <val>ltpda</val> | |
134 <type>char</type> | |
135 </param> | |
136 <param> | |
137 <key>ID</key> | |
138 <val>[]</val> | |
139 <type>double</type> | |
140 </param> | |
141 <param> | |
142 <key>BINARY</key> | |
143 <val>no</val> | |
144 <type>char</type> | |
145 </param> | |
146 </plist> | |
147 <plist name="none"> | |
148 <param> | |
149 <key>FILENAME</key> | |
150 <val/> | |
151 <type>char</type> | |
152 </param> | |
153 </plist> | |
154 </plists> | |
155 </LTPDAalgorithm> | |
156 <plist name="none"> | |
157 <param> | |
158 <key>Nsecs</key> | |
159 <val>100</val> | |
160 <type>Char</type> | |
161 </param> | |
162 <param> | |
163 <key>fs</key> | |
164 <val>10</val> | |
165 <type>Char</type> | |
166 </param> | |
167 <param> | |
168 <key>tsfcn</key> | |
169 <val>randn(size(t))</val> | |
170 <type>Char</type> | |
171 </param> | |
172 </plist> | |
173 <port number="0" terminal="" type="output"> | |
174 <node> | |
175 <pipe color="-26266" dstblock="a1" dstport="0" srcblock="ao plist" thickness="2.5"/> | |
176 <pipe color="-26266" dstblock="a2" dstport="0" srcblock="ao plist" thickness="2.5"/> | |
177 <pipe color="-26266" dstblock="a3" dstport="0" srcblock="ao plist" thickness="2.5"/> | |
178 <pipe color="-26266" dstblock="a4" dstport="0" srcblock="ao plist" thickness="2.5"/> | |
179 </node> | |
180 </port> | |
181 </block> | |
182 <block bounds="97 3 56 62" inputs="1" name="a1" outputs="1"> | |
183 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
184 <HelpText> AO analysis object class constructor. | |
185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
186 | |
187 DESCRIPTION: AO analysis object class constructor. | |
188 Create an analysis object. | |
189 | |
190 Possible constructors: | |
191 | |
192 a = ao() - creates an empty analysis object | |
193 a = ao('a1.xml') - creates a new analysis object by loading the | |
194 analysis object from disk. | |
195 a = ao('a1.mat') - creates a new analysis object by loading the | |
196 analysis object from disk. | |
197 a = ao('a1.mat') - creates a new analysis object by loading the | |
198 2-column data set stored in the .MAT file. | |
199 a = ao('file.txt') - creates a new analysis object by loading the | |
200 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
201 to be an equally sampled two-column file of | |
202 time and amplitude. By default, the amplitude | |
203 units are taken to be Volts ('V') and the | |
204 time samples are assumed to be in seconds. | |
205 a = ao('file',pl) - creates a new analysis object by loading the | |
206 data in 'file'. The parameter list decide how the | |
207 analysis object is created. The valid key values | |
208 of the parameter list are: | |
209 'type' 'tsdata','fsdata','xydata' | |
210 [default: 'tsdata'] | |
211 'use_fs' if this value is set, the | |
212 x-axes is computed by the fs value. | |
213 [default: empty array] | |
214 'columns' [1 2 1 4] | |
215 Each pair represented the x- and y-axes. | |
216 (Each column pair creates an analysis object) | |
217 Is the value 'use_fs' is used then | |
218 represent each column the y-axes. | |
219 (Each column creates an analysis object) | |
220 [default: [1 2] ] | |
221 'comment_char' The comment character in the file | |
222 [default: ''] | |
223 'description' To set the description in the analysis object | |
224 '...' every property where exist a public | |
225 set-function in the AO class e.g. | |
226 setName, setT0, setYunits, ... | |
227 If the constructor creates multiple ao's it is | |
228 possible to give each data class its own e.g. | |
229 'name'. In this case the parameter list with the | |
230 key 'name' must have cell of the different values | |
231 as the name of the different data objects. e.g. | |
232 pl = plist('columns', [1 2 1 3], ... | |
233 'name', {'name1' 'name2'}, ... | |
234 'xunits', unit('s'), ... | |
235 'yunits', {unit('V') unit('Hz'})); | |
236 This parameter list creates two ao's with tsdata. | |
237 | |
238 'Robust' - set this to 'yes' to use (slow) | |
239 robust data reading. Useful for | |
240 complicated file formats. | |
241 [default: 'yes'] | |
242 | |
243 NOTE: Data files with comments at the end of the lines can only be | |
244 read if there are no lines with only comments. In this case, do not | |
245 specify a comment character. If you really want to load a file like | |
246 this, specify the 'Robust' option; this will be very slow for large | |
247 files. | |
248 | |
249 a = ao(data) - creates an analysis object with a data | |
250 object. Data object can be one of tsdata, | |
251 fsdata, cdata, xydata, xyzdata. | |
252 a = ao(data, hist) - creates an analysis object with a data | |
253 object and a history object | |
254 a = ao(specwin) - creates an analysis object from a specwin | |
255 object | |
256 a = ao(plist) - creates an analysis object from the description | |
257 given in the parameter list | |
258 | |
259 Parameter sets for plist constructor (in order of priority): | |
260 | |
261 From XML File | |
262 ------------- | |
263 | |
264 Construct an AO by loading it from an XML file. | |
265 | |
266 'filename' - construct an AO from a filename. | |
267 Example: plist('filename', 'a1.xml') | |
268 [default: empty string] | |
269 | |
270 From MAT File | |
271 ------------- | |
272 | |
273 Construct an AO by loading it from a MAT file. | |
274 | |
275 'filename' - construct an AO from a filename. | |
276 Example: plist('filename', 'a1.mat') | |
277 [default: empty string] | |
278 | |
279 From ASCII File | |
280 --------------- | |
281 | |
282 Construct an AO by loading it from an ASCII text file. | |
283 | |
284 'filename' - construct an AO from a filename. | |
285 Example: plist('filename', 'a1.txt') | |
286 [default: empty string] | |
287 | |
288 For additional parameters, see constructor ao(file, pl) above. | |
289 | |
290 From Function | |
291 ------------- | |
292 | |
293 Construct an AO from the description of any valid MATLAB function. | |
294 | |
295 'fcn' - any valid MATLAB function. | |
296 Example: plist('fcn', 'randn(100,1)') | |
297 | |
298 You can pass additional parameters to the fcn as extra | |
299 parameters in the parameter list: | |
300 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
301 | |
302 ** Note: case is ignored in the function specification | |
303 such the following: | |
304 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
305 results in: | |
306 2*2*[1:20] | |
307 | |
308 [default: 'randn(100,1)'] | |
309 | |
310 From Values | |
311 ----------- | |
312 | |
313 Construct an AO from a set of values. | |
314 | |
315 'vals' - a set of values. | |
316 Example: plist('vals', [1 2 3]) | |
317 optional parameter: repeat 'N' times | |
318 Example: plist('vals', [1 2 3], 'N', 10) | |
319 | |
320 [default: vals: [1], N: [1] ] | |
321 OR | |
322 | |
323 To produce a tsdata AO | |
324 | |
325 'xvals' - a set of x values. | |
326 'yvals' - a set of y values. | |
327 | |
328 | |
329 | |
330 From Time-series Function | |
331 ------------------------- | |
332 | |
333 Construct an AO from a function of time, t. | |
334 | |
335 'tsfcn' - a function of time. | |
336 | |
337 You can also specify optional parameters | |
338 'fs' - sampling frequency [default: 10 Hz] | |
339 'nsecs' - length in seconds [default: 10 s] | |
340 | |
341 You can also specify the initial time (t0) associated with | |
342 the time-series by passing a parameter 't0' with a value | |
343 that is a time object [default: time(0)] | |
344 Example: | |
345 plist('fs', 10, 'nsecs', 10, ... | |
346 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
347 't0', time('1980-12-01 12:43:12')); | |
348 | |
349 From Frequency-series Function | |
350 ------------------------------ | |
351 | |
352 Construct an AO from a function of frequency, f. | |
353 | |
354 'fsfcn' - a function of frequency, f. [default: 'f'] | |
355 | |
356 You can also specify optional parameters: | |
357 'f1' - the initial frequency [default: 1e-9] | |
358 'f2' - the final frequency [default: 5] | |
359 'nf' - the number of frequency samples [default: 1000] | |
360 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
361 or provide a frequency vector: | |
362 'f' - a vector of frequencies on which to evaluate the | |
363 function [default: [] ] | |
364 | |
365 From Window | |
366 ----------- | |
367 | |
368 Construct an AO from a spectral window object. | |
369 | |
370 'win' - A specwin object. | |
371 | |
372 This creates a cdata type AO containing the window values. | |
373 Example: plist('win', specwin('Hannning', 100)) | |
374 | |
375 [default: specwin('Hanning', 100)] | |
376 | |
377 From Waveform | |
378 ------------- | |
379 | |
380 Construct an AO from a waveform description. | |
381 | |
382 'waveform' - a waveform description (see options below). | |
383 | |
384 You can also specify additional parameters: | |
385 'fs' - sampling frequency [default: 10 Hz] | |
386 'nsecs' - length in seconds [default: 10 s] | |
387 't0' - time-stamp of the first data sample [default time(0)] | |
388 | |
389 and, for the following waveform types: | |
390 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
391 (can be vectors for sum of sine waves) | |
392 'A' - Amplitude of the wave | |
393 'f' - Frequency of the wave | |
394 'phi' - Phase of the eave | |
395 'nsecs' - Number of seconds (in seconds) | |
396 'toff' - Offset of the wave (in seconds) | |
397 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
398 'sigma' specify the standard deviation | |
399 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
400 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
401 'Square wave' - 'f', 'duty' (help square) | |
402 'Sawtooth' - 'f', 'width' (help sawtooth) | |
403 | |
404 You can also specify the initial time (t0) associated with | |
405 the time-series by passing a parameter 't0' with a value | |
406 that is a time object. | |
407 | |
408 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
409 fs: 10, nsecs: 10, t0: time(0) ] | |
410 | |
411 | |
412 From Repository | |
413 --------------- | |
414 | |
415 Construct an AO by retrieving it from an LTPDA repository. | |
416 | |
417 'Hostname' - the repository hostname. Only those objects which | |
418 are AOs are returned. | |
419 [default: 'localhost']; | |
420 | |
421 Additional parameters: | |
422 | |
423 'Database' - The database name [default: 'ltpda'] | |
424 'ID' - A vector of object IDs. [default: []] | |
425 'CID' - Retrieve all AO objects from a particular | |
426 collection. | |
427 'Binary' - Set to 'yes' to retrieve from stored binary | |
428 representation (not always available). | |
429 | |
430 From Polynomial | |
431 --------------- | |
432 | |
433 Construct an AO from a set of polynomial coefficients. | |
434 | |
435 'polyval' - a set of polynomial coefficients. | |
436 [default: [-0.0001 0.02 -1 -1] ] | |
437 | |
438 Additional parameters: | |
439 'Nsecs' and 'fs' - number of seconds, and sample rate | |
440 [defaults: nsecs: 10, fs: 10] | |
441 or 't' - vector of time vertices | |
442 [default: [] ] | |
443 | |
444 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
445 | |
446 | |
447 From Pzmodel | |
448 ------------ | |
449 | |
450 Generates an ao with a timeseries with a prescribed spectrum. | |
451 p = [pz(f1,q1) pz(f2,q2)] | |
452 z = [pz(f3,q3)] | |
453 pzm = pzmodel(gain, p, z) | |
454 The constructor also needs: fs - sampling frequency | |
455 nsecs - number of seconds to be generated | |
456 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
457 | |
458 From Model | |
459 ---------- | |
460 | |
461 A collection of built-in models which construct data series and return | |
462 them in AOs. | |
463 | |
464 'Model' - give the model name. To get a list of models: | |
465 ao(plist('Model', '')) | |
466 | |
467 Each model has additional parameters that need to be passed. To see the | |
468 parameters: | |
469 >> help ao.<model_name> | |
470 | |
471 for example, | |
472 | |
473 >> help ao.mdc1_fd_dynamics | |
474 | |
475 From Plist | |
476 ---------- | |
477 | |
478 'Plist' - construct from a plist. The value passed should be a plist | |
479 object. | |
480 [default: empty plist] | |
481 | |
482 | |
483 | |
484 Examples: | |
485 | |
486 1) Normally distributed random noise time-series | |
487 | |
488 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
489 rd10 = ao(p); | |
490 | |
491 | |
492 Indexing: | |
493 b = a(1) % where a is an array of analysis objects | |
494 d = a.data; % get the data object | |
495 h = a.hist; % get the history object | |
496 d = a.data.x(1:20); % get a matrix of data values x; | |
497 | |
498 2) Timeseries with a prescribed spectrum | |
499 | |
500 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
501 a = ao(p) | |
502 | |
503 fs - sampling frequency | |
504 nsecs - number of seconds in time series | |
505 ndigits - number of digits for symbolic math toolbox (default: 32) | |
506 | |
507 | |
508 From pzmodel | |
509 ------------ | |
510 | |
511 Generates an ao with a timeseries with a prescribed spectrum. | |
512 p = [pz(f1,q1) pz(f2,q2)] | |
513 z = [pz(f3,q3)] | |
514 pzm = pzmodel(gain, p, z) | |
515 The constructor also needs: fs - sampling frequency | |
516 nsecs - number of seconds to be generated | |
517 a = ao(pzm, nsecs, fs) | |
518 | |
519 The following call returns an minfo object that contains information | |
520 about the AO constructor: | |
521 | |
522 >> info = ao.getInfo | |
523 | |
524 You can get information about class methods by calling: | |
525 | |
526 >> info = ao.getInfo(method) | |
527 | |
528 e.g. info = ao.getInfo('psd') | |
529 | |
530 You can also restrict the sets of parameters contained in the minfo | |
531 object by calling: | |
532 | |
533 >> info = ao.getInfo(method, set) | |
534 | |
535 e.g., info = ao.getInfo('ao', 'From Vals') | |
536 | |
537 See also tsdata, fsdata, xydata, cdata, xyzdata | |
538 | |
539 M Hewitson 30-01-07 | |
540 | |
541 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
542 </HelpText> | |
543 <sets> | |
544 <set name="Default"/> | |
545 <set name="From XML File"/> | |
546 <set name="From MAT File"/> | |
547 <set name="From ASCII File"/> | |
548 <set name="From Function"/> | |
549 <set name="From Values"/> | |
550 <set name="From Time-series Function"/> | |
551 <set name="From Frequency-series Function"/> | |
552 <set name="From Window"/> | |
553 <set name="From Waveform"/> | |
554 <set name="From Polynomial"/> | |
555 <set name="From Repository"/> | |
556 <set name="From Plist"/> | |
557 <set name="From Pzmodel"/> | |
558 <set name="From Model"/> | |
559 </sets> | |
560 <plists> | |
561 <plist name="none"/> | |
562 <plist name="none"> | |
563 <param> | |
564 <key>FILENAME</key> | |
565 <val/> | |
566 <type>char</type> | |
567 </param> | |
568 </plist> | |
569 <plist name="none"> | |
570 <param> | |
571 <key>FILENAME</key> | |
572 <val/> | |
573 <type>char</type> | |
574 </param> | |
575 </plist> | |
576 <plist name="none"> | |
577 <param> | |
578 <key>FILENAME</key> | |
579 <val/> | |
580 <type>char</type> | |
581 </param> | |
582 <param> | |
583 <key>TYPE</key> | |
584 <val>tsdata</val> | |
585 <type>char</type> | |
586 </param> | |
587 <param> | |
588 <key>COLUMNS</key> | |
589 <val>[1 2]</val> | |
590 <type>double</type> | |
591 </param> | |
592 <param> | |
593 <key>XUNITS</key> | |
594 <val>[ unit(' s ') ]</val> | |
595 <type>unit</type> | |
596 </param> | |
597 <param> | |
598 <key>YUNITS</key> | |
599 <val>[ unit(' ') ]</val> | |
600 <type>unit</type> | |
601 </param> | |
602 <param> | |
603 <key>T0</key> | |
604 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
605 <type>time</type> | |
606 </param> | |
607 <param> | |
608 <key>COMMENT_CHAR</key> | |
609 <val/> | |
610 <type>char</type> | |
611 </param> | |
612 <param> | |
613 <key>USE_FS</key> | |
614 <val/> | |
615 <type>char</type> | |
616 </param> | |
617 <param> | |
618 <key>ROBUST</key> | |
619 <val>yes</val> | |
620 <type>char</type> | |
621 </param> | |
622 </plist> | |
623 <plist name="none"> | |
624 <param> | |
625 <key>FCN</key> | |
626 <val>randn(100,1)</val> | |
627 <type>char</type> | |
628 </param> | |
629 <param> | |
630 <key>YUNITS</key> | |
631 <val>[ unit(' ') ]</val> | |
632 <type>unit</type> | |
633 </param> | |
634 </plist> | |
635 <plist name="none"> | |
636 <param> | |
637 <key>VALS</key> | |
638 <val>[]</val> | |
639 <type>double</type> | |
640 </param> | |
641 <param> | |
642 <key>N</key> | |
643 <val>1</val> | |
644 <type>double</type> | |
645 </param> | |
646 <param> | |
647 <key>DTYPE</key> | |
648 <val/> | |
649 <type>char</type> | |
650 </param> | |
651 <param> | |
652 <key>FS</key> | |
653 <val>[]</val> | |
654 <type>double</type> | |
655 </param> | |
656 <param> | |
657 <key>XVALS</key> | |
658 <val>[]</val> | |
659 <type>double</type> | |
660 </param> | |
661 <param> | |
662 <key>YVALS</key> | |
663 <val>[]</val> | |
664 <type>double</type> | |
665 </param> | |
666 <param> | |
667 <key>YUNITS</key> | |
668 <val/> | |
669 <type>char</type> | |
670 </param> | |
671 </plist> | |
672 <plist name="none"> | |
673 <param> | |
674 <key>TSFCN</key> | |
675 <val>t</val> | |
676 <type>char</type> | |
677 </param> | |
678 <param> | |
679 <key>FS</key> | |
680 <val>10</val> | |
681 <type>double</type> | |
682 </param> | |
683 <param> | |
684 <key>NSECS</key> | |
685 <val>1</val> | |
686 <type>double</type> | |
687 </param> | |
688 <param> | |
689 <key>T0</key> | |
690 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
691 <type>time</type> | |
692 </param> | |
693 <param> | |
694 <key>XUNITS</key> | |
695 <val>[ unit(' s ') ]</val> | |
696 <type>unit</type> | |
697 </param> | |
698 <param> | |
699 <key>YUNITS</key> | |
700 <val>[ unit(' ') ]</val> | |
701 <type>unit</type> | |
702 </param> | |
703 </plist> | |
704 <plist name="none"> | |
705 <param> | |
706 <key>FSFCN</key> | |
707 <val>f</val> | |
708 <type>char</type> | |
709 </param> | |
710 <param> | |
711 <key>F1</key> | |
712 <val>1e-09</val> | |
713 <type>double</type> | |
714 </param> | |
715 <param> | |
716 <key>F2</key> | |
717 <val>5</val> | |
718 <type>double</type> | |
719 </param> | |
720 <param> | |
721 <key>NF</key> | |
722 <val>1000</val> | |
723 <type>double</type> | |
724 </param> | |
725 <param> | |
726 <key>SCALE</key> | |
727 <val>log</val> | |
728 <type>char</type> | |
729 </param> | |
730 <param> | |
731 <key>F</key> | |
732 <val>[]</val> | |
733 <type>double</type> | |
734 </param> | |
735 <param> | |
736 <key>XUNITS</key> | |
737 <val>[ unit(' Hz ') ]</val> | |
738 <type>unit</type> | |
739 </param> | |
740 <param> | |
741 <key>YUNITS</key> | |
742 <val>[ unit(' ') ]</val> | |
743 <type>unit</type> | |
744 </param> | |
745 </plist> | |
746 <plist name="none"> | |
747 <param> | |
748 <key>WIN</key> | |
749 <val> specwin('Hanning', 100)</val> | |
750 <type>specwin</type> | |
751 </param> | |
752 <param> | |
753 <key>YUNITS</key> | |
754 <val>[ unit(' ') ]</val> | |
755 <type>unit</type> | |
756 </param> | |
757 </plist> | |
758 <plist name="none"> | |
759 <param> | |
760 <key>WAVEFORM</key> | |
761 <val>sine wave</val> | |
762 <type>char</type> | |
763 </param> | |
764 <param> | |
765 <key>A</key> | |
766 <val>1</val> | |
767 <type>double</type> | |
768 </param> | |
769 <param> | |
770 <key>F</key> | |
771 <val>1.23</val> | |
772 <type>double</type> | |
773 </param> | |
774 <param> | |
775 <key>PHI</key> | |
776 <val>0</val> | |
777 <type>double</type> | |
778 </param> | |
779 <param> | |
780 <key>FS</key> | |
781 <val>10</val> | |
782 <type>double</type> | |
783 </param> | |
784 <param> | |
785 <key>NSECS</key> | |
786 <val>10</val> | |
787 <type>double</type> | |
788 </param> | |
789 <param> | |
790 <key>T0</key> | |
791 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
792 <type>time</type> | |
793 </param> | |
794 <param> | |
795 <key>TOFF</key> | |
796 <val>0</val> | |
797 <type>double</type> | |
798 </param> | |
799 <param> | |
800 <key>XUNITS</key> | |
801 <val>[ unit(' s ') ]</val> | |
802 <type>unit</type> | |
803 </param> | |
804 <param> | |
805 <key>YUNITS</key> | |
806 <val>[ unit(' ') ]</val> | |
807 <type>unit</type> | |
808 </param> | |
809 </plist> | |
810 <plist name="none"> | |
811 <param> | |
812 <key>POLYVAL</key> | |
813 <val>[-0.0001 0.02 -1 -1]</val> | |
814 <type>double</type> | |
815 </param> | |
816 <param> | |
817 <key>NSECS</key> | |
818 <val>10</val> | |
819 <type>double</type> | |
820 </param> | |
821 <param> | |
822 <key>FS</key> | |
823 <val>10</val> | |
824 <type>double</type> | |
825 </param> | |
826 <param> | |
827 <key>T</key> | |
828 <val>[]</val> | |
829 <type>double</type> | |
830 </param> | |
831 <param> | |
832 <key>XUNITS</key> | |
833 <val>[ unit(' s ') ]</val> | |
834 <type>unit</type> | |
835 </param> | |
836 <param> | |
837 <key>YUNITS</key> | |
838 <val>[ unit(' ') ]</val> | |
839 <type>unit</type> | |
840 </param> | |
841 </plist> | |
842 <plist name="none"> | |
843 <param> | |
844 <key>HOSTNAME</key> | |
845 <val>localhost</val> | |
846 <type>char</type> | |
847 </param> | |
848 <param> | |
849 <key>DATABASE</key> | |
850 <val>ltpda</val> | |
851 <type>char</type> | |
852 </param> | |
853 <param> | |
854 <key>ID</key> | |
855 <val>[]</val> | |
856 <type>double</type> | |
857 </param> | |
858 <param> | |
859 <key>BINARY</key> | |
860 <val>no</val> | |
861 <type>char</type> | |
862 </param> | |
863 </plist> | |
864 <plist name="none"> | |
865 <param> | |
866 <key>PLIST</key> | |
867 <val>(empty-plist)</val> | |
868 <type>plist</type> | |
869 </param> | |
870 </plist> | |
871 <plist name="none"> | |
872 <param> | |
873 <key>PZMODEL</key> | |
874 <val>pzmodel(none)</val> | |
875 <type>pzmodel</type> | |
876 </param> | |
877 <param> | |
878 <key>NSECS</key> | |
879 <val>0</val> | |
880 <type>double</type> | |
881 </param> | |
882 <param> | |
883 <key>FS</key> | |
884 <val>0</val> | |
885 <type>double</type> | |
886 </param> | |
887 <param> | |
888 <key>XUNITS</key> | |
889 <val>[ unit(' s ') ]</val> | |
890 <type>unit</type> | |
891 </param> | |
892 <param> | |
893 <key>YUNITS</key> | |
894 <val>[ unit(' ') ]</val> | |
895 <type>unit</type> | |
896 </param> | |
897 </plist> | |
898 <plist name="none"> | |
899 <param> | |
900 <key>MODEL</key> | |
901 <val/> | |
902 <type>char</type> | |
903 </param> | |
904 </plist> | |
905 </plists> | |
906 </LTPDAalgorithm> | |
907 <plist name="none"> | |
908 <param> | |
909 <key>PLIST</key> | |
910 <val>PORT_0</val> | |
911 <type>Char</type> | |
912 </param> | |
913 </plist> | |
914 <port number="0" terminal="" type="output"> | |
915 <node> | |
916 <pipe color="-3657166" dstblock="a5" dstport="0" srcblock="a1" thickness="2.5"/> | |
917 </node> | |
918 </port> | |
919 </block> | |
920 <block bounds="93 69 69 59" inputs="1" name="a2" outputs="1"> | |
921 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
922 <HelpText> AO analysis object class constructor. | |
923 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
924 | |
925 DESCRIPTION: AO analysis object class constructor. | |
926 Create an analysis object. | |
927 | |
928 Possible constructors: | |
929 | |
930 a = ao() - creates an empty analysis object | |
931 a = ao('a1.xml') - creates a new analysis object by loading the | |
932 analysis object from disk. | |
933 a = ao('a1.mat') - creates a new analysis object by loading the | |
934 analysis object from disk. | |
935 a = ao('a1.mat') - creates a new analysis object by loading the | |
936 2-column data set stored in the .MAT file. | |
937 a = ao('file.txt') - creates a new analysis object by loading the | |
938 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
939 to be an equally sampled two-column file of | |
940 time and amplitude. By default, the amplitude | |
941 units are taken to be Volts ('V') and the | |
942 time samples are assumed to be in seconds. | |
943 a = ao('file',pl) - creates a new analysis object by loading the | |
944 data in 'file'. The parameter list decide how the | |
945 analysis object is created. The valid key values | |
946 of the parameter list are: | |
947 'type' 'tsdata','fsdata','xydata' | |
948 [default: 'tsdata'] | |
949 'use_fs' if this value is set, the | |
950 x-axes is computed by the fs value. | |
951 [default: empty array] | |
952 'columns' [1 2 1 4] | |
953 Each pair represented the x- and y-axes. | |
954 (Each column pair creates an analysis object) | |
955 Is the value 'use_fs' is used then | |
956 represent each column the y-axes. | |
957 (Each column creates an analysis object) | |
958 [default: [1 2] ] | |
959 'comment_char' The comment character in the file | |
960 [default: ''] | |
961 'description' To set the description in the analysis object | |
962 '...' every property where exist a public | |
963 set-function in the AO class e.g. | |
964 setName, setT0, setYunits, ... | |
965 If the constructor creates multiple ao's it is | |
966 possible to give each data class its own e.g. | |
967 'name'. In this case the parameter list with the | |
968 key 'name' must have cell of the different values | |
969 as the name of the different data objects. e.g. | |
970 pl = plist('columns', [1 2 1 3], ... | |
971 'name', {'name1' 'name2'}, ... | |
972 'xunits', unit('s'), ... | |
973 'yunits', {unit('V') unit('Hz'})); | |
974 This parameter list creates two ao's with tsdata. | |
975 | |
976 'Robust' - set this to 'yes' to use (slow) | |
977 robust data reading. Useful for | |
978 complicated file formats. | |
979 [default: 'yes'] | |
980 | |
981 NOTE: Data files with comments at the end of the lines can only be | |
982 read if there are no lines with only comments. In this case, do not | |
983 specify a comment character. If you really want to load a file like | |
984 this, specify the 'Robust' option; this will be very slow for large | |
985 files. | |
986 | |
987 a = ao(data) - creates an analysis object with a data | |
988 object. Data object can be one of tsdata, | |
989 fsdata, cdata, xydata, xyzdata. | |
990 a = ao(data, hist) - creates an analysis object with a data | |
991 object and a history object | |
992 a = ao(specwin) - creates an analysis object from a specwin | |
993 object | |
994 a = ao(plist) - creates an analysis object from the description | |
995 given in the parameter list | |
996 | |
997 Parameter sets for plist constructor (in order of priority): | |
998 | |
999 From XML File | |
1000 ------------- | |
1001 | |
1002 Construct an AO by loading it from an XML file. | |
1003 | |
1004 'filename' - construct an AO from a filename. | |
1005 Example: plist('filename', 'a1.xml') | |
1006 [default: empty string] | |
1007 | |
1008 From MAT File | |
1009 ------------- | |
1010 | |
1011 Construct an AO by loading it from a MAT file. | |
1012 | |
1013 'filename' - construct an AO from a filename. | |
1014 Example: plist('filename', 'a1.mat') | |
1015 [default: empty string] | |
1016 | |
1017 From ASCII File | |
1018 --------------- | |
1019 | |
1020 Construct an AO by loading it from an ASCII text file. | |
1021 | |
1022 'filename' - construct an AO from a filename. | |
1023 Example: plist('filename', 'a1.txt') | |
1024 [default: empty string] | |
1025 | |
1026 For additional parameters, see constructor ao(file, pl) above. | |
1027 | |
1028 From Function | |
1029 ------------- | |
1030 | |
1031 Construct an AO from the description of any valid MATLAB function. | |
1032 | |
1033 'fcn' - any valid MATLAB function. | |
1034 Example: plist('fcn', 'randn(100,1)') | |
1035 | |
1036 You can pass additional parameters to the fcn as extra | |
1037 parameters in the parameter list: | |
1038 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
1039 | |
1040 ** Note: case is ignored in the function specification | |
1041 such the following: | |
1042 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
1043 results in: | |
1044 2*2*[1:20] | |
1045 | |
1046 [default: 'randn(100,1)'] | |
1047 | |
1048 From Values | |
1049 ----------- | |
1050 | |
1051 Construct an AO from a set of values. | |
1052 | |
1053 'vals' - a set of values. | |
1054 Example: plist('vals', [1 2 3]) | |
1055 optional parameter: repeat 'N' times | |
1056 Example: plist('vals', [1 2 3], 'N', 10) | |
1057 | |
1058 [default: vals: [1], N: [1] ] | |
1059 OR | |
1060 | |
1061 To produce a tsdata AO | |
1062 | |
1063 'xvals' - a set of x values. | |
1064 'yvals' - a set of y values. | |
1065 | |
1066 | |
1067 | |
1068 From Time-series Function | |
1069 ------------------------- | |
1070 | |
1071 Construct an AO from a function of time, t. | |
1072 | |
1073 'tsfcn' - a function of time. | |
1074 | |
1075 You can also specify optional parameters | |
1076 'fs' - sampling frequency [default: 10 Hz] | |
1077 'nsecs' - length in seconds [default: 10 s] | |
1078 | |
1079 You can also specify the initial time (t0) associated with | |
1080 the time-series by passing a parameter 't0' with a value | |
1081 that is a time object [default: time(0)] | |
1082 Example: | |
1083 plist('fs', 10, 'nsecs', 10, ... | |
1084 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
1085 't0', time('1980-12-01 12:43:12')); | |
1086 | |
1087 From Frequency-series Function | |
1088 ------------------------------ | |
1089 | |
1090 Construct an AO from a function of frequency, f. | |
1091 | |
1092 'fsfcn' - a function of frequency, f. [default: 'f'] | |
1093 | |
1094 You can also specify optional parameters: | |
1095 'f1' - the initial frequency [default: 1e-9] | |
1096 'f2' - the final frequency [default: 5] | |
1097 'nf' - the number of frequency samples [default: 1000] | |
1098 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
1099 or provide a frequency vector: | |
1100 'f' - a vector of frequencies on which to evaluate the | |
1101 function [default: [] ] | |
1102 | |
1103 From Window | |
1104 ----------- | |
1105 | |
1106 Construct an AO from a spectral window object. | |
1107 | |
1108 'win' - A specwin object. | |
1109 | |
1110 This creates a cdata type AO containing the window values. | |
1111 Example: plist('win', specwin('Hannning', 100)) | |
1112 | |
1113 [default: specwin('Hanning', 100)] | |
1114 | |
1115 From Waveform | |
1116 ------------- | |
1117 | |
1118 Construct an AO from a waveform description. | |
1119 | |
1120 'waveform' - a waveform description (see options below). | |
1121 | |
1122 You can also specify additional parameters: | |
1123 'fs' - sampling frequency [default: 10 Hz] | |
1124 'nsecs' - length in seconds [default: 10 s] | |
1125 't0' - time-stamp of the first data sample [default time(0)] | |
1126 | |
1127 and, for the following waveform types: | |
1128 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
1129 (can be vectors for sum of sine waves) | |
1130 'A' - Amplitude of the wave | |
1131 'f' - Frequency of the wave | |
1132 'phi' - Phase of the eave | |
1133 'nsecs' - Number of seconds (in seconds) | |
1134 'toff' - Offset of the wave (in seconds) | |
1135 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
1136 'sigma' specify the standard deviation | |
1137 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
1138 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
1139 'Square wave' - 'f', 'duty' (help square) | |
1140 'Sawtooth' - 'f', 'width' (help sawtooth) | |
1141 | |
1142 You can also specify the initial time (t0) associated with | |
1143 the time-series by passing a parameter 't0' with a value | |
1144 that is a time object. | |
1145 | |
1146 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
1147 fs: 10, nsecs: 10, t0: time(0) ] | |
1148 | |
1149 | |
1150 From Repository | |
1151 --------------- | |
1152 | |
1153 Construct an AO by retrieving it from an LTPDA repository. | |
1154 | |
1155 'Hostname' - the repository hostname. Only those objects which | |
1156 are AOs are returned. | |
1157 [default: 'localhost']; | |
1158 | |
1159 Additional parameters: | |
1160 | |
1161 'Database' - The database name [default: 'ltpda'] | |
1162 'ID' - A vector of object IDs. [default: []] | |
1163 'CID' - Retrieve all AO objects from a particular | |
1164 collection. | |
1165 'Binary' - Set to 'yes' to retrieve from stored binary | |
1166 representation (not always available). | |
1167 | |
1168 From Polynomial | |
1169 --------------- | |
1170 | |
1171 Construct an AO from a set of polynomial coefficients. | |
1172 | |
1173 'polyval' - a set of polynomial coefficients. | |
1174 [default: [-0.0001 0.02 -1 -1] ] | |
1175 | |
1176 Additional parameters: | |
1177 'Nsecs' and 'fs' - number of seconds, and sample rate | |
1178 [defaults: nsecs: 10, fs: 10] | |
1179 or 't' - vector of time vertices | |
1180 [default: [] ] | |
1181 | |
1182 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
1183 | |
1184 | |
1185 From Pzmodel | |
1186 ------------ | |
1187 | |
1188 Generates an ao with a timeseries with a prescribed spectrum. | |
1189 p = [pz(f1,q1) pz(f2,q2)] | |
1190 z = [pz(f3,q3)] | |
1191 pzm = pzmodel(gain, p, z) | |
1192 The constructor also needs: fs - sampling frequency | |
1193 nsecs - number of seconds to be generated | |
1194 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
1195 | |
1196 From Model | |
1197 ---------- | |
1198 | |
1199 A collection of built-in models which construct data series and return | |
1200 them in AOs. | |
1201 | |
1202 'Model' - give the model name. To get a list of models: | |
1203 ao(plist('Model', '')) | |
1204 | |
1205 Each model has additional parameters that need to be passed. To see the | |
1206 parameters: | |
1207 >> help ao.<model_name> | |
1208 | |
1209 for example, | |
1210 | |
1211 >> help ao.mdc1_fd_dynamics | |
1212 | |
1213 From Plist | |
1214 ---------- | |
1215 | |
1216 'Plist' - construct from a plist. The value passed should be a plist | |
1217 object. | |
1218 [default: empty plist] | |
1219 | |
1220 | |
1221 | |
1222 Examples: | |
1223 | |
1224 1) Normally distributed random noise time-series | |
1225 | |
1226 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
1227 rd10 = ao(p); | |
1228 | |
1229 | |
1230 Indexing: | |
1231 b = a(1) % where a is an array of analysis objects | |
1232 d = a.data; % get the data object | |
1233 h = a.hist; % get the history object | |
1234 d = a.data.x(1:20); % get a matrix of data values x; | |
1235 | |
1236 2) Timeseries with a prescribed spectrum | |
1237 | |
1238 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
1239 a = ao(p) | |
1240 | |
1241 fs - sampling frequency | |
1242 nsecs - number of seconds in time series | |
1243 ndigits - number of digits for symbolic math toolbox (default: 32) | |
1244 | |
1245 | |
1246 From pzmodel | |
1247 ------------ | |
1248 | |
1249 Generates an ao with a timeseries with a prescribed spectrum. | |
1250 p = [pz(f1,q1) pz(f2,q2)] | |
1251 z = [pz(f3,q3)] | |
1252 pzm = pzmodel(gain, p, z) | |
1253 The constructor also needs: fs - sampling frequency | |
1254 nsecs - number of seconds to be generated | |
1255 a = ao(pzm, nsecs, fs) | |
1256 | |
1257 The following call returns an minfo object that contains information | |
1258 about the AO constructor: | |
1259 | |
1260 >> info = ao.getInfo | |
1261 | |
1262 You can get information about class methods by calling: | |
1263 | |
1264 >> info = ao.getInfo(method) | |
1265 | |
1266 e.g. info = ao.getInfo('psd') | |
1267 | |
1268 You can also restrict the sets of parameters contained in the minfo | |
1269 object by calling: | |
1270 | |
1271 >> info = ao.getInfo(method, set) | |
1272 | |
1273 e.g., info = ao.getInfo('ao', 'From Vals') | |
1274 | |
1275 See also tsdata, fsdata, xydata, cdata, xyzdata | |
1276 | |
1277 M Hewitson 30-01-07 | |
1278 | |
1279 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
1280 </HelpText> | |
1281 <sets> | |
1282 <set name="Default"/> | |
1283 <set name="From XML File"/> | |
1284 <set name="From MAT File"/> | |
1285 <set name="From ASCII File"/> | |
1286 <set name="From Function"/> | |
1287 <set name="From Values"/> | |
1288 <set name="From Time-series Function"/> | |
1289 <set name="From Frequency-series Function"/> | |
1290 <set name="From Window"/> | |
1291 <set name="From Waveform"/> | |
1292 <set name="From Polynomial"/> | |
1293 <set name="From Repository"/> | |
1294 <set name="From Plist"/> | |
1295 <set name="From Pzmodel"/> | |
1296 <set name="From Model"/> | |
1297 </sets> | |
1298 <plists> | |
1299 <plist name="none"/> | |
1300 <plist name="none"> | |
1301 <param> | |
1302 <key>FILENAME</key> | |
1303 <val/> | |
1304 <type>char</type> | |
1305 </param> | |
1306 </plist> | |
1307 <plist name="none"> | |
1308 <param> | |
1309 <key>FILENAME</key> | |
1310 <val/> | |
1311 <type>char</type> | |
1312 </param> | |
1313 </plist> | |
1314 <plist name="none"> | |
1315 <param> | |
1316 <key>FILENAME</key> | |
1317 <val/> | |
1318 <type>char</type> | |
1319 </param> | |
1320 <param> | |
1321 <key>TYPE</key> | |
1322 <val>tsdata</val> | |
1323 <type>char</type> | |
1324 </param> | |
1325 <param> | |
1326 <key>COLUMNS</key> | |
1327 <val>[1 2]</val> | |
1328 <type>double</type> | |
1329 </param> | |
1330 <param> | |
1331 <key>XUNITS</key> | |
1332 <val>[ unit(' s ') ]</val> | |
1333 <type>unit</type> | |
1334 </param> | |
1335 <param> | |
1336 <key>YUNITS</key> | |
1337 <val>[ unit(' ') ]</val> | |
1338 <type>unit</type> | |
1339 </param> | |
1340 <param> | |
1341 <key>T0</key> | |
1342 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
1343 <type>time</type> | |
1344 </param> | |
1345 <param> | |
1346 <key>COMMENT_CHAR</key> | |
1347 <val/> | |
1348 <type>char</type> | |
1349 </param> | |
1350 <param> | |
1351 <key>USE_FS</key> | |
1352 <val/> | |
1353 <type>char</type> | |
1354 </param> | |
1355 <param> | |
1356 <key>ROBUST</key> | |
1357 <val>yes</val> | |
1358 <type>char</type> | |
1359 </param> | |
1360 </plist> | |
1361 <plist name="none"> | |
1362 <param> | |
1363 <key>FCN</key> | |
1364 <val>randn(100,1)</val> | |
1365 <type>char</type> | |
1366 </param> | |
1367 <param> | |
1368 <key>YUNITS</key> | |
1369 <val>[ unit(' ') ]</val> | |
1370 <type>unit</type> | |
1371 </param> | |
1372 </plist> | |
1373 <plist name="none"> | |
1374 <param> | |
1375 <key>VALS</key> | |
1376 <val>[]</val> | |
1377 <type>double</type> | |
1378 </param> | |
1379 <param> | |
1380 <key>N</key> | |
1381 <val>1</val> | |
1382 <type>double</type> | |
1383 </param> | |
1384 <param> | |
1385 <key>DTYPE</key> | |
1386 <val/> | |
1387 <type>char</type> | |
1388 </param> | |
1389 <param> | |
1390 <key>FS</key> | |
1391 <val>[]</val> | |
1392 <type>double</type> | |
1393 </param> | |
1394 <param> | |
1395 <key>XVALS</key> | |
1396 <val>[]</val> | |
1397 <type>double</type> | |
1398 </param> | |
1399 <param> | |
1400 <key>YVALS</key> | |
1401 <val>[]</val> | |
1402 <type>double</type> | |
1403 </param> | |
1404 <param> | |
1405 <key>YUNITS</key> | |
1406 <val/> | |
1407 <type>char</type> | |
1408 </param> | |
1409 </plist> | |
1410 <plist name="none"> | |
1411 <param> | |
1412 <key>TSFCN</key> | |
1413 <val>t</val> | |
1414 <type>char</type> | |
1415 </param> | |
1416 <param> | |
1417 <key>FS</key> | |
1418 <val>10</val> | |
1419 <type>double</type> | |
1420 </param> | |
1421 <param> | |
1422 <key>NSECS</key> | |
1423 <val>1</val> | |
1424 <type>double</type> | |
1425 </param> | |
1426 <param> | |
1427 <key>T0</key> | |
1428 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
1429 <type>time</type> | |
1430 </param> | |
1431 <param> | |
1432 <key>XUNITS</key> | |
1433 <val>[ unit(' s ') ]</val> | |
1434 <type>unit</type> | |
1435 </param> | |
1436 <param> | |
1437 <key>YUNITS</key> | |
1438 <val>[ unit(' ') ]</val> | |
1439 <type>unit</type> | |
1440 </param> | |
1441 </plist> | |
1442 <plist name="none"> | |
1443 <param> | |
1444 <key>FSFCN</key> | |
1445 <val>f</val> | |
1446 <type>char</type> | |
1447 </param> | |
1448 <param> | |
1449 <key>F1</key> | |
1450 <val>1e-09</val> | |
1451 <type>double</type> | |
1452 </param> | |
1453 <param> | |
1454 <key>F2</key> | |
1455 <val>5</val> | |
1456 <type>double</type> | |
1457 </param> | |
1458 <param> | |
1459 <key>NF</key> | |
1460 <val>1000</val> | |
1461 <type>double</type> | |
1462 </param> | |
1463 <param> | |
1464 <key>SCALE</key> | |
1465 <val>log</val> | |
1466 <type>char</type> | |
1467 </param> | |
1468 <param> | |
1469 <key>F</key> | |
1470 <val>[]</val> | |
1471 <type>double</type> | |
1472 </param> | |
1473 <param> | |
1474 <key>XUNITS</key> | |
1475 <val>[ unit(' Hz ') ]</val> | |
1476 <type>unit</type> | |
1477 </param> | |
1478 <param> | |
1479 <key>YUNITS</key> | |
1480 <val>[ unit(' ') ]</val> | |
1481 <type>unit</type> | |
1482 </param> | |
1483 </plist> | |
1484 <plist name="none"> | |
1485 <param> | |
1486 <key>WIN</key> | |
1487 <val> specwin('Hanning', 100)</val> | |
1488 <type>specwin</type> | |
1489 </param> | |
1490 <param> | |
1491 <key>YUNITS</key> | |
1492 <val>[ unit(' ') ]</val> | |
1493 <type>unit</type> | |
1494 </param> | |
1495 </plist> | |
1496 <plist name="none"> | |
1497 <param> | |
1498 <key>WAVEFORM</key> | |
1499 <val>sine wave</val> | |
1500 <type>char</type> | |
1501 </param> | |
1502 <param> | |
1503 <key>A</key> | |
1504 <val>1</val> | |
1505 <type>double</type> | |
1506 </param> | |
1507 <param> | |
1508 <key>F</key> | |
1509 <val>1.23</val> | |
1510 <type>double</type> | |
1511 </param> | |
1512 <param> | |
1513 <key>PHI</key> | |
1514 <val>0</val> | |
1515 <type>double</type> | |
1516 </param> | |
1517 <param> | |
1518 <key>FS</key> | |
1519 <val>10</val> | |
1520 <type>double</type> | |
1521 </param> | |
1522 <param> | |
1523 <key>NSECS</key> | |
1524 <val>10</val> | |
1525 <type>double</type> | |
1526 </param> | |
1527 <param> | |
1528 <key>T0</key> | |
1529 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
1530 <type>time</type> | |
1531 </param> | |
1532 <param> | |
1533 <key>TOFF</key> | |
1534 <val>0</val> | |
1535 <type>double</type> | |
1536 </param> | |
1537 <param> | |
1538 <key>XUNITS</key> | |
1539 <val>[ unit(' s ') ]</val> | |
1540 <type>unit</type> | |
1541 </param> | |
1542 <param> | |
1543 <key>YUNITS</key> | |
1544 <val>[ unit(' ') ]</val> | |
1545 <type>unit</type> | |
1546 </param> | |
1547 </plist> | |
1548 <plist name="none"> | |
1549 <param> | |
1550 <key>POLYVAL</key> | |
1551 <val>[-0.0001 0.02 -1 -1]</val> | |
1552 <type>double</type> | |
1553 </param> | |
1554 <param> | |
1555 <key>NSECS</key> | |
1556 <val>10</val> | |
1557 <type>double</type> | |
1558 </param> | |
1559 <param> | |
1560 <key>FS</key> | |
1561 <val>10</val> | |
1562 <type>double</type> | |
1563 </param> | |
1564 <param> | |
1565 <key>T</key> | |
1566 <val>[]</val> | |
1567 <type>double</type> | |
1568 </param> | |
1569 <param> | |
1570 <key>XUNITS</key> | |
1571 <val>[ unit(' s ') ]</val> | |
1572 <type>unit</type> | |
1573 </param> | |
1574 <param> | |
1575 <key>YUNITS</key> | |
1576 <val>[ unit(' ') ]</val> | |
1577 <type>unit</type> | |
1578 </param> | |
1579 </plist> | |
1580 <plist name="none"> | |
1581 <param> | |
1582 <key>HOSTNAME</key> | |
1583 <val>localhost</val> | |
1584 <type>char</type> | |
1585 </param> | |
1586 <param> | |
1587 <key>DATABASE</key> | |
1588 <val>ltpda</val> | |
1589 <type>char</type> | |
1590 </param> | |
1591 <param> | |
1592 <key>ID</key> | |
1593 <val>[]</val> | |
1594 <type>double</type> | |
1595 </param> | |
1596 <param> | |
1597 <key>BINARY</key> | |
1598 <val>no</val> | |
1599 <type>char</type> | |
1600 </param> | |
1601 </plist> | |
1602 <plist name="none"> | |
1603 <param> | |
1604 <key>PLIST</key> | |
1605 <val>(empty-plist)</val> | |
1606 <type>plist</type> | |
1607 </param> | |
1608 </plist> | |
1609 <plist name="none"> | |
1610 <param> | |
1611 <key>PZMODEL</key> | |
1612 <val>pzmodel(none)</val> | |
1613 <type>pzmodel</type> | |
1614 </param> | |
1615 <param> | |
1616 <key>NSECS</key> | |
1617 <val>0</val> | |
1618 <type>double</type> | |
1619 </param> | |
1620 <param> | |
1621 <key>FS</key> | |
1622 <val>0</val> | |
1623 <type>double</type> | |
1624 </param> | |
1625 <param> | |
1626 <key>XUNITS</key> | |
1627 <val>[ unit(' s ') ]</val> | |
1628 <type>unit</type> | |
1629 </param> | |
1630 <param> | |
1631 <key>YUNITS</key> | |
1632 <val>[ unit(' ') ]</val> | |
1633 <type>unit</type> | |
1634 </param> | |
1635 </plist> | |
1636 <plist name="none"> | |
1637 <param> | |
1638 <key>MODEL</key> | |
1639 <val/> | |
1640 <type>char</type> | |
1641 </param> | |
1642 </plist> | |
1643 </plists> | |
1644 </LTPDAalgorithm> | |
1645 <plist name="none"> | |
1646 <param> | |
1647 <key>PLIST</key> | |
1648 <val>PORT_0</val> | |
1649 <type>Char</type> | |
1650 </param> | |
1651 </plist> | |
1652 <port number="0" terminal="" type="output"> | |
1653 <node> | |
1654 <pipe color="-3657166" dstblock="a6" dstport="0" srcblock="a2" thickness="2.5"/> | |
1655 </node> | |
1656 </port> | |
1657 </block> | |
1658 <block bounds="97 142 65 55" inputs="1" name="a3" outputs="1"> | |
1659 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
1660 <HelpText> AO analysis object class constructor. | |
1661 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
1662 | |
1663 DESCRIPTION: AO analysis object class constructor. | |
1664 Create an analysis object. | |
1665 | |
1666 Possible constructors: | |
1667 | |
1668 a = ao() - creates an empty analysis object | |
1669 a = ao('a1.xml') - creates a new analysis object by loading the | |
1670 analysis object from disk. | |
1671 a = ao('a1.mat') - creates a new analysis object by loading the | |
1672 analysis object from disk. | |
1673 a = ao('a1.mat') - creates a new analysis object by loading the | |
1674 2-column data set stored in the .MAT file. | |
1675 a = ao('file.txt') - creates a new analysis object by loading the | |
1676 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
1677 to be an equally sampled two-column file of | |
1678 time and amplitude. By default, the amplitude | |
1679 units are taken to be Volts ('V') and the | |
1680 time samples are assumed to be in seconds. | |
1681 a = ao('file',pl) - creates a new analysis object by loading the | |
1682 data in 'file'. The parameter list decide how the | |
1683 analysis object is created. The valid key values | |
1684 of the parameter list are: | |
1685 'type' 'tsdata','fsdata','xydata' | |
1686 [default: 'tsdata'] | |
1687 'use_fs' if this value is set, the | |
1688 x-axes is computed by the fs value. | |
1689 [default: empty array] | |
1690 'columns' [1 2 1 4] | |
1691 Each pair represented the x- and y-axes. | |
1692 (Each column pair creates an analysis object) | |
1693 Is the value 'use_fs' is used then | |
1694 represent each column the y-axes. | |
1695 (Each column creates an analysis object) | |
1696 [default: [1 2] ] | |
1697 'comment_char' The comment character in the file | |
1698 [default: ''] | |
1699 'description' To set the description in the analysis object | |
1700 '...' every property where exist a public | |
1701 set-function in the AO class e.g. | |
1702 setName, setT0, setYunits, ... | |
1703 If the constructor creates multiple ao's it is | |
1704 possible to give each data class its own e.g. | |
1705 'name'. In this case the parameter list with the | |
1706 key 'name' must have cell of the different values | |
1707 as the name of the different data objects. e.g. | |
1708 pl = plist('columns', [1 2 1 3], ... | |
1709 'name', {'name1' 'name2'}, ... | |
1710 'xunits', unit('s'), ... | |
1711 'yunits', {unit('V') unit('Hz'})); | |
1712 This parameter list creates two ao's with tsdata. | |
1713 | |
1714 'Robust' - set this to 'yes' to use (slow) | |
1715 robust data reading. Useful for | |
1716 complicated file formats. | |
1717 [default: 'yes'] | |
1718 | |
1719 NOTE: Data files with comments at the end of the lines can only be | |
1720 read if there are no lines with only comments. In this case, do not | |
1721 specify a comment character. If you really want to load a file like | |
1722 this, specify the 'Robust' option; this will be very slow for large | |
1723 files. | |
1724 | |
1725 a = ao(data) - creates an analysis object with a data | |
1726 object. Data object can be one of tsdata, | |
1727 fsdata, cdata, xydata, xyzdata. | |
1728 a = ao(data, hist) - creates an analysis object with a data | |
1729 object and a history object | |
1730 a = ao(specwin) - creates an analysis object from a specwin | |
1731 object | |
1732 a = ao(plist) - creates an analysis object from the description | |
1733 given in the parameter list | |
1734 | |
1735 Parameter sets for plist constructor (in order of priority): | |
1736 | |
1737 From XML File | |
1738 ------------- | |
1739 | |
1740 Construct an AO by loading it from an XML file. | |
1741 | |
1742 'filename' - construct an AO from a filename. | |
1743 Example: plist('filename', 'a1.xml') | |
1744 [default: empty string] | |
1745 | |
1746 From MAT File | |
1747 ------------- | |
1748 | |
1749 Construct an AO by loading it from a MAT file. | |
1750 | |
1751 'filename' - construct an AO from a filename. | |
1752 Example: plist('filename', 'a1.mat') | |
1753 [default: empty string] | |
1754 | |
1755 From ASCII File | |
1756 --------------- | |
1757 | |
1758 Construct an AO by loading it from an ASCII text file. | |
1759 | |
1760 'filename' - construct an AO from a filename. | |
1761 Example: plist('filename', 'a1.txt') | |
1762 [default: empty string] | |
1763 | |
1764 For additional parameters, see constructor ao(file, pl) above. | |
1765 | |
1766 From Function | |
1767 ------------- | |
1768 | |
1769 Construct an AO from the description of any valid MATLAB function. | |
1770 | |
1771 'fcn' - any valid MATLAB function. | |
1772 Example: plist('fcn', 'randn(100,1)') | |
1773 | |
1774 You can pass additional parameters to the fcn as extra | |
1775 parameters in the parameter list: | |
1776 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
1777 | |
1778 ** Note: case is ignored in the function specification | |
1779 such the following: | |
1780 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
1781 results in: | |
1782 2*2*[1:20] | |
1783 | |
1784 [default: 'randn(100,1)'] | |
1785 | |
1786 From Values | |
1787 ----------- | |
1788 | |
1789 Construct an AO from a set of values. | |
1790 | |
1791 'vals' - a set of values. | |
1792 Example: plist('vals', [1 2 3]) | |
1793 optional parameter: repeat 'N' times | |
1794 Example: plist('vals', [1 2 3], 'N', 10) | |
1795 | |
1796 [default: vals: [1], N: [1] ] | |
1797 OR | |
1798 | |
1799 To produce a tsdata AO | |
1800 | |
1801 'xvals' - a set of x values. | |
1802 'yvals' - a set of y values. | |
1803 | |
1804 | |
1805 | |
1806 From Time-series Function | |
1807 ------------------------- | |
1808 | |
1809 Construct an AO from a function of time, t. | |
1810 | |
1811 'tsfcn' - a function of time. | |
1812 | |
1813 You can also specify optional parameters | |
1814 'fs' - sampling frequency [default: 10 Hz] | |
1815 'nsecs' - length in seconds [default: 10 s] | |
1816 | |
1817 You can also specify the initial time (t0) associated with | |
1818 the time-series by passing a parameter 't0' with a value | |
1819 that is a time object [default: time(0)] | |
1820 Example: | |
1821 plist('fs', 10, 'nsecs', 10, ... | |
1822 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
1823 't0', time('1980-12-01 12:43:12')); | |
1824 | |
1825 From Frequency-series Function | |
1826 ------------------------------ | |
1827 | |
1828 Construct an AO from a function of frequency, f. | |
1829 | |
1830 'fsfcn' - a function of frequency, f. [default: 'f'] | |
1831 | |
1832 You can also specify optional parameters: | |
1833 'f1' - the initial frequency [default: 1e-9] | |
1834 'f2' - the final frequency [default: 5] | |
1835 'nf' - the number of frequency samples [default: 1000] | |
1836 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
1837 or provide a frequency vector: | |
1838 'f' - a vector of frequencies on which to evaluate the | |
1839 function [default: [] ] | |
1840 | |
1841 From Window | |
1842 ----------- | |
1843 | |
1844 Construct an AO from a spectral window object. | |
1845 | |
1846 'win' - A specwin object. | |
1847 | |
1848 This creates a cdata type AO containing the window values. | |
1849 Example: plist('win', specwin('Hannning', 100)) | |
1850 | |
1851 [default: specwin('Hanning', 100)] | |
1852 | |
1853 From Waveform | |
1854 ------------- | |
1855 | |
1856 Construct an AO from a waveform description. | |
1857 | |
1858 'waveform' - a waveform description (see options below). | |
1859 | |
1860 You can also specify additional parameters: | |
1861 'fs' - sampling frequency [default: 10 Hz] | |
1862 'nsecs' - length in seconds [default: 10 s] | |
1863 't0' - time-stamp of the first data sample [default time(0)] | |
1864 | |
1865 and, for the following waveform types: | |
1866 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
1867 (can be vectors for sum of sine waves) | |
1868 'A' - Amplitude of the wave | |
1869 'f' - Frequency of the wave | |
1870 'phi' - Phase of the eave | |
1871 'nsecs' - Number of seconds (in seconds) | |
1872 'toff' - Offset of the wave (in seconds) | |
1873 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
1874 'sigma' specify the standard deviation | |
1875 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
1876 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
1877 'Square wave' - 'f', 'duty' (help square) | |
1878 'Sawtooth' - 'f', 'width' (help sawtooth) | |
1879 | |
1880 You can also specify the initial time (t0) associated with | |
1881 the time-series by passing a parameter 't0' with a value | |
1882 that is a time object. | |
1883 | |
1884 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
1885 fs: 10, nsecs: 10, t0: time(0) ] | |
1886 | |
1887 | |
1888 From Repository | |
1889 --------------- | |
1890 | |
1891 Construct an AO by retrieving it from an LTPDA repository. | |
1892 | |
1893 'Hostname' - the repository hostname. Only those objects which | |
1894 are AOs are returned. | |
1895 [default: 'localhost']; | |
1896 | |
1897 Additional parameters: | |
1898 | |
1899 'Database' - The database name [default: 'ltpda'] | |
1900 'ID' - A vector of object IDs. [default: []] | |
1901 'CID' - Retrieve all AO objects from a particular | |
1902 collection. | |
1903 'Binary' - Set to 'yes' to retrieve from stored binary | |
1904 representation (not always available). | |
1905 | |
1906 From Polynomial | |
1907 --------------- | |
1908 | |
1909 Construct an AO from a set of polynomial coefficients. | |
1910 | |
1911 'polyval' - a set of polynomial coefficients. | |
1912 [default: [-0.0001 0.02 -1 -1] ] | |
1913 | |
1914 Additional parameters: | |
1915 'Nsecs' and 'fs' - number of seconds, and sample rate | |
1916 [defaults: nsecs: 10, fs: 10] | |
1917 or 't' - vector of time vertices | |
1918 [default: [] ] | |
1919 | |
1920 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
1921 | |
1922 | |
1923 From Pzmodel | |
1924 ------------ | |
1925 | |
1926 Generates an ao with a timeseries with a prescribed spectrum. | |
1927 p = [pz(f1,q1) pz(f2,q2)] | |
1928 z = [pz(f3,q3)] | |
1929 pzm = pzmodel(gain, p, z) | |
1930 The constructor also needs: fs - sampling frequency | |
1931 nsecs - number of seconds to be generated | |
1932 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
1933 | |
1934 From Model | |
1935 ---------- | |
1936 | |
1937 A collection of built-in models which construct data series and return | |
1938 them in AOs. | |
1939 | |
1940 'Model' - give the model name. To get a list of models: | |
1941 ao(plist('Model', '')) | |
1942 | |
1943 Each model has additional parameters that need to be passed. To see the | |
1944 parameters: | |
1945 >> help ao.<model_name> | |
1946 | |
1947 for example, | |
1948 | |
1949 >> help ao.mdc1_fd_dynamics | |
1950 | |
1951 From Plist | |
1952 ---------- | |
1953 | |
1954 'Plist' - construct from a plist. The value passed should be a plist | |
1955 object. | |
1956 [default: empty plist] | |
1957 | |
1958 | |
1959 | |
1960 Examples: | |
1961 | |
1962 1) Normally distributed random noise time-series | |
1963 | |
1964 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
1965 rd10 = ao(p); | |
1966 | |
1967 | |
1968 Indexing: | |
1969 b = a(1) % where a is an array of analysis objects | |
1970 d = a.data; % get the data object | |
1971 h = a.hist; % get the history object | |
1972 d = a.data.x(1:20); % get a matrix of data values x; | |
1973 | |
1974 2) Timeseries with a prescribed spectrum | |
1975 | |
1976 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
1977 a = ao(p) | |
1978 | |
1979 fs - sampling frequency | |
1980 nsecs - number of seconds in time series | |
1981 ndigits - number of digits for symbolic math toolbox (default: 32) | |
1982 | |
1983 | |
1984 From pzmodel | |
1985 ------------ | |
1986 | |
1987 Generates an ao with a timeseries with a prescribed spectrum. | |
1988 p = [pz(f1,q1) pz(f2,q2)] | |
1989 z = [pz(f3,q3)] | |
1990 pzm = pzmodel(gain, p, z) | |
1991 The constructor also needs: fs - sampling frequency | |
1992 nsecs - number of seconds to be generated | |
1993 a = ao(pzm, nsecs, fs) | |
1994 | |
1995 The following call returns an minfo object that contains information | |
1996 about the AO constructor: | |
1997 | |
1998 >> info = ao.getInfo | |
1999 | |
2000 You can get information about class methods by calling: | |
2001 | |
2002 >> info = ao.getInfo(method) | |
2003 | |
2004 e.g. info = ao.getInfo('psd') | |
2005 | |
2006 You can also restrict the sets of parameters contained in the minfo | |
2007 object by calling: | |
2008 | |
2009 >> info = ao.getInfo(method, set) | |
2010 | |
2011 e.g., info = ao.getInfo('ao', 'From Vals') | |
2012 | |
2013 See also tsdata, fsdata, xydata, cdata, xyzdata | |
2014 | |
2015 M Hewitson 30-01-07 | |
2016 | |
2017 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
2018 </HelpText> | |
2019 <sets> | |
2020 <set name="Default"/> | |
2021 <set name="From XML File"/> | |
2022 <set name="From MAT File"/> | |
2023 <set name="From ASCII File"/> | |
2024 <set name="From Function"/> | |
2025 <set name="From Values"/> | |
2026 <set name="From Time-series Function"/> | |
2027 <set name="From Frequency-series Function"/> | |
2028 <set name="From Window"/> | |
2029 <set name="From Waveform"/> | |
2030 <set name="From Polynomial"/> | |
2031 <set name="From Repository"/> | |
2032 <set name="From Plist"/> | |
2033 <set name="From Pzmodel"/> | |
2034 <set name="From Model"/> | |
2035 </sets> | |
2036 <plists> | |
2037 <plist name="none"/> | |
2038 <plist name="none"> | |
2039 <param> | |
2040 <key>FILENAME</key> | |
2041 <val/> | |
2042 <type>char</type> | |
2043 </param> | |
2044 </plist> | |
2045 <plist name="none"> | |
2046 <param> | |
2047 <key>FILENAME</key> | |
2048 <val/> | |
2049 <type>char</type> | |
2050 </param> | |
2051 </plist> | |
2052 <plist name="none"> | |
2053 <param> | |
2054 <key>FILENAME</key> | |
2055 <val/> | |
2056 <type>char</type> | |
2057 </param> | |
2058 <param> | |
2059 <key>TYPE</key> | |
2060 <val>tsdata</val> | |
2061 <type>char</type> | |
2062 </param> | |
2063 <param> | |
2064 <key>COLUMNS</key> | |
2065 <val>[1 2]</val> | |
2066 <type>double</type> | |
2067 </param> | |
2068 <param> | |
2069 <key>XUNITS</key> | |
2070 <val>[ unit(' s ') ]</val> | |
2071 <type>unit</type> | |
2072 </param> | |
2073 <param> | |
2074 <key>YUNITS</key> | |
2075 <val>[ unit(' ') ]</val> | |
2076 <type>unit</type> | |
2077 </param> | |
2078 <param> | |
2079 <key>T0</key> | |
2080 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
2081 <type>time</type> | |
2082 </param> | |
2083 <param> | |
2084 <key>COMMENT_CHAR</key> | |
2085 <val/> | |
2086 <type>char</type> | |
2087 </param> | |
2088 <param> | |
2089 <key>USE_FS</key> | |
2090 <val/> | |
2091 <type>char</type> | |
2092 </param> | |
2093 <param> | |
2094 <key>ROBUST</key> | |
2095 <val>yes</val> | |
2096 <type>char</type> | |
2097 </param> | |
2098 </plist> | |
2099 <plist name="none"> | |
2100 <param> | |
2101 <key>FCN</key> | |
2102 <val>randn(100,1)</val> | |
2103 <type>char</type> | |
2104 </param> | |
2105 <param> | |
2106 <key>YUNITS</key> | |
2107 <val>[ unit(' ') ]</val> | |
2108 <type>unit</type> | |
2109 </param> | |
2110 </plist> | |
2111 <plist name="none"> | |
2112 <param> | |
2113 <key>VALS</key> | |
2114 <val>[]</val> | |
2115 <type>double</type> | |
2116 </param> | |
2117 <param> | |
2118 <key>N</key> | |
2119 <val>1</val> | |
2120 <type>double</type> | |
2121 </param> | |
2122 <param> | |
2123 <key>DTYPE</key> | |
2124 <val/> | |
2125 <type>char</type> | |
2126 </param> | |
2127 <param> | |
2128 <key>FS</key> | |
2129 <val>[]</val> | |
2130 <type>double</type> | |
2131 </param> | |
2132 <param> | |
2133 <key>XVALS</key> | |
2134 <val>[]</val> | |
2135 <type>double</type> | |
2136 </param> | |
2137 <param> | |
2138 <key>YVALS</key> | |
2139 <val>[]</val> | |
2140 <type>double</type> | |
2141 </param> | |
2142 <param> | |
2143 <key>YUNITS</key> | |
2144 <val/> | |
2145 <type>char</type> | |
2146 </param> | |
2147 </plist> | |
2148 <plist name="none"> | |
2149 <param> | |
2150 <key>TSFCN</key> | |
2151 <val>t</val> | |
2152 <type>char</type> | |
2153 </param> | |
2154 <param> | |
2155 <key>FS</key> | |
2156 <val>10</val> | |
2157 <type>double</type> | |
2158 </param> | |
2159 <param> | |
2160 <key>NSECS</key> | |
2161 <val>1</val> | |
2162 <type>double</type> | |
2163 </param> | |
2164 <param> | |
2165 <key>T0</key> | |
2166 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
2167 <type>time</type> | |
2168 </param> | |
2169 <param> | |
2170 <key>XUNITS</key> | |
2171 <val>[ unit(' s ') ]</val> | |
2172 <type>unit</type> | |
2173 </param> | |
2174 <param> | |
2175 <key>YUNITS</key> | |
2176 <val>[ unit(' ') ]</val> | |
2177 <type>unit</type> | |
2178 </param> | |
2179 </plist> | |
2180 <plist name="none"> | |
2181 <param> | |
2182 <key>FSFCN</key> | |
2183 <val>f</val> | |
2184 <type>char</type> | |
2185 </param> | |
2186 <param> | |
2187 <key>F1</key> | |
2188 <val>1e-09</val> | |
2189 <type>double</type> | |
2190 </param> | |
2191 <param> | |
2192 <key>F2</key> | |
2193 <val>5</val> | |
2194 <type>double</type> | |
2195 </param> | |
2196 <param> | |
2197 <key>NF</key> | |
2198 <val>1000</val> | |
2199 <type>double</type> | |
2200 </param> | |
2201 <param> | |
2202 <key>SCALE</key> | |
2203 <val>log</val> | |
2204 <type>char</type> | |
2205 </param> | |
2206 <param> | |
2207 <key>F</key> | |
2208 <val>[]</val> | |
2209 <type>double</type> | |
2210 </param> | |
2211 <param> | |
2212 <key>XUNITS</key> | |
2213 <val>[ unit(' Hz ') ]</val> | |
2214 <type>unit</type> | |
2215 </param> | |
2216 <param> | |
2217 <key>YUNITS</key> | |
2218 <val>[ unit(' ') ]</val> | |
2219 <type>unit</type> | |
2220 </param> | |
2221 </plist> | |
2222 <plist name="none"> | |
2223 <param> | |
2224 <key>WIN</key> | |
2225 <val> specwin('Hanning', 100)</val> | |
2226 <type>specwin</type> | |
2227 </param> | |
2228 <param> | |
2229 <key>YUNITS</key> | |
2230 <val>[ unit(' ') ]</val> | |
2231 <type>unit</type> | |
2232 </param> | |
2233 </plist> | |
2234 <plist name="none"> | |
2235 <param> | |
2236 <key>WAVEFORM</key> | |
2237 <val>sine wave</val> | |
2238 <type>char</type> | |
2239 </param> | |
2240 <param> | |
2241 <key>A</key> | |
2242 <val>1</val> | |
2243 <type>double</type> | |
2244 </param> | |
2245 <param> | |
2246 <key>F</key> | |
2247 <val>1.23</val> | |
2248 <type>double</type> | |
2249 </param> | |
2250 <param> | |
2251 <key>PHI</key> | |
2252 <val>0</val> | |
2253 <type>double</type> | |
2254 </param> | |
2255 <param> | |
2256 <key>FS</key> | |
2257 <val>10</val> | |
2258 <type>double</type> | |
2259 </param> | |
2260 <param> | |
2261 <key>NSECS</key> | |
2262 <val>10</val> | |
2263 <type>double</type> | |
2264 </param> | |
2265 <param> | |
2266 <key>T0</key> | |
2267 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
2268 <type>time</type> | |
2269 </param> | |
2270 <param> | |
2271 <key>TOFF</key> | |
2272 <val>0</val> | |
2273 <type>double</type> | |
2274 </param> | |
2275 <param> | |
2276 <key>XUNITS</key> | |
2277 <val>[ unit(' s ') ]</val> | |
2278 <type>unit</type> | |
2279 </param> | |
2280 <param> | |
2281 <key>YUNITS</key> | |
2282 <val>[ unit(' ') ]</val> | |
2283 <type>unit</type> | |
2284 </param> | |
2285 </plist> | |
2286 <plist name="none"> | |
2287 <param> | |
2288 <key>POLYVAL</key> | |
2289 <val>[-0.0001 0.02 -1 -1]</val> | |
2290 <type>double</type> | |
2291 </param> | |
2292 <param> | |
2293 <key>NSECS</key> | |
2294 <val>10</val> | |
2295 <type>double</type> | |
2296 </param> | |
2297 <param> | |
2298 <key>FS</key> | |
2299 <val>10</val> | |
2300 <type>double</type> | |
2301 </param> | |
2302 <param> | |
2303 <key>T</key> | |
2304 <val>[]</val> | |
2305 <type>double</type> | |
2306 </param> | |
2307 <param> | |
2308 <key>XUNITS</key> | |
2309 <val>[ unit(' s ') ]</val> | |
2310 <type>unit</type> | |
2311 </param> | |
2312 <param> | |
2313 <key>YUNITS</key> | |
2314 <val>[ unit(' ') ]</val> | |
2315 <type>unit</type> | |
2316 </param> | |
2317 </plist> | |
2318 <plist name="none"> | |
2319 <param> | |
2320 <key>HOSTNAME</key> | |
2321 <val>localhost</val> | |
2322 <type>char</type> | |
2323 </param> | |
2324 <param> | |
2325 <key>DATABASE</key> | |
2326 <val>ltpda</val> | |
2327 <type>char</type> | |
2328 </param> | |
2329 <param> | |
2330 <key>ID</key> | |
2331 <val>[]</val> | |
2332 <type>double</type> | |
2333 </param> | |
2334 <param> | |
2335 <key>BINARY</key> | |
2336 <val>no</val> | |
2337 <type>char</type> | |
2338 </param> | |
2339 </plist> | |
2340 <plist name="none"> | |
2341 <param> | |
2342 <key>PLIST</key> | |
2343 <val>(empty-plist)</val> | |
2344 <type>plist</type> | |
2345 </param> | |
2346 </plist> | |
2347 <plist name="none"> | |
2348 <param> | |
2349 <key>PZMODEL</key> | |
2350 <val>pzmodel(none)</val> | |
2351 <type>pzmodel</type> | |
2352 </param> | |
2353 <param> | |
2354 <key>NSECS</key> | |
2355 <val>0</val> | |
2356 <type>double</type> | |
2357 </param> | |
2358 <param> | |
2359 <key>FS</key> | |
2360 <val>0</val> | |
2361 <type>double</type> | |
2362 </param> | |
2363 <param> | |
2364 <key>XUNITS</key> | |
2365 <val>[ unit(' s ') ]</val> | |
2366 <type>unit</type> | |
2367 </param> | |
2368 <param> | |
2369 <key>YUNITS</key> | |
2370 <val>[ unit(' ') ]</val> | |
2371 <type>unit</type> | |
2372 </param> | |
2373 </plist> | |
2374 <plist name="none"> | |
2375 <param> | |
2376 <key>MODEL</key> | |
2377 <val/> | |
2378 <type>char</type> | |
2379 </param> | |
2380 </plist> | |
2381 </plists> | |
2382 </LTPDAalgorithm> | |
2383 <plist name="none"> | |
2384 <param> | |
2385 <key>PLIST</key> | |
2386 <val>PORT_0</val> | |
2387 <type>Char</type> | |
2388 </param> | |
2389 </plist> | |
2390 <port number="0" terminal="" type="output"> | |
2391 <node> | |
2392 <pipe color="-3657166" dstblock="a7" dstport="0" srcblock="a3" thickness="2.5"/> | |
2393 </node> | |
2394 </port> | |
2395 </block> | |
2396 <block bounds="102 216 56 47" inputs="1" name="a4" outputs="1"> | |
2397 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
2398 <HelpText> AO analysis object class constructor. | |
2399 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
2400 | |
2401 DESCRIPTION: AO analysis object class constructor. | |
2402 Create an analysis object. | |
2403 | |
2404 Possible constructors: | |
2405 | |
2406 a = ao() - creates an empty analysis object | |
2407 a = ao('a1.xml') - creates a new analysis object by loading the | |
2408 analysis object from disk. | |
2409 a = ao('a1.mat') - creates a new analysis object by loading the | |
2410 analysis object from disk. | |
2411 a = ao('a1.mat') - creates a new analysis object by loading the | |
2412 2-column data set stored in the .MAT file. | |
2413 a = ao('file.txt') - creates a new analysis object by loading the | |
2414 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
2415 to be an equally sampled two-column file of | |
2416 time and amplitude. By default, the amplitude | |
2417 units are taken to be Volts ('V') and the | |
2418 time samples are assumed to be in seconds. | |
2419 a = ao('file',pl) - creates a new analysis object by loading the | |
2420 data in 'file'. The parameter list decide how the | |
2421 analysis object is created. The valid key values | |
2422 of the parameter list are: | |
2423 'type' 'tsdata','fsdata','xydata' | |
2424 [default: 'tsdata'] | |
2425 'use_fs' if this value is set, the | |
2426 x-axes is computed by the fs value. | |
2427 [default: empty array] | |
2428 'columns' [1 2 1 4] | |
2429 Each pair represented the x- and y-axes. | |
2430 (Each column pair creates an analysis object) | |
2431 Is the value 'use_fs' is used then | |
2432 represent each column the y-axes. | |
2433 (Each column creates an analysis object) | |
2434 [default: [1 2] ] | |
2435 'comment_char' The comment character in the file | |
2436 [default: ''] | |
2437 'description' To set the description in the analysis object | |
2438 '...' every property where exist a public | |
2439 set-function in the AO class e.g. | |
2440 setName, setT0, setYunits, ... | |
2441 If the constructor creates multiple ao's it is | |
2442 possible to give each data class its own e.g. | |
2443 'name'. In this case the parameter list with the | |
2444 key 'name' must have cell of the different values | |
2445 as the name of the different data objects. e.g. | |
2446 pl = plist('columns', [1 2 1 3], ... | |
2447 'name', {'name1' 'name2'}, ... | |
2448 'xunits', unit('s'), ... | |
2449 'yunits', {unit('V') unit('Hz'})); | |
2450 This parameter list creates two ao's with tsdata. | |
2451 | |
2452 'Robust' - set this to 'yes' to use (slow) | |
2453 robust data reading. Useful for | |
2454 complicated file formats. | |
2455 [default: 'yes'] | |
2456 | |
2457 NOTE: Data files with comments at the end of the lines can only be | |
2458 read if there are no lines with only comments. In this case, do not | |
2459 specify a comment character. If you really want to load a file like | |
2460 this, specify the 'Robust' option; this will be very slow for large | |
2461 files. | |
2462 | |
2463 a = ao(data) - creates an analysis object with a data | |
2464 object. Data object can be one of tsdata, | |
2465 fsdata, cdata, xydata, xyzdata. | |
2466 a = ao(data, hist) - creates an analysis object with a data | |
2467 object and a history object | |
2468 a = ao(specwin) - creates an analysis object from a specwin | |
2469 object | |
2470 a = ao(plist) - creates an analysis object from the description | |
2471 given in the parameter list | |
2472 | |
2473 Parameter sets for plist constructor (in order of priority): | |
2474 | |
2475 From XML File | |
2476 ------------- | |
2477 | |
2478 Construct an AO by loading it from an XML file. | |
2479 | |
2480 'filename' - construct an AO from a filename. | |
2481 Example: plist('filename', 'a1.xml') | |
2482 [default: empty string] | |
2483 | |
2484 From MAT File | |
2485 ------------- | |
2486 | |
2487 Construct an AO by loading it from a MAT file. | |
2488 | |
2489 'filename' - construct an AO from a filename. | |
2490 Example: plist('filename', 'a1.mat') | |
2491 [default: empty string] | |
2492 | |
2493 From ASCII File | |
2494 --------------- | |
2495 | |
2496 Construct an AO by loading it from an ASCII text file. | |
2497 | |
2498 'filename' - construct an AO from a filename. | |
2499 Example: plist('filename', 'a1.txt') | |
2500 [default: empty string] | |
2501 | |
2502 For additional parameters, see constructor ao(file, pl) above. | |
2503 | |
2504 From Function | |
2505 ------------- | |
2506 | |
2507 Construct an AO from the description of any valid MATLAB function. | |
2508 | |
2509 'fcn' - any valid MATLAB function. | |
2510 Example: plist('fcn', 'randn(100,1)') | |
2511 | |
2512 You can pass additional parameters to the fcn as extra | |
2513 parameters in the parameter list: | |
2514 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
2515 | |
2516 ** Note: case is ignored in the function specification | |
2517 such the following: | |
2518 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
2519 results in: | |
2520 2*2*[1:20] | |
2521 | |
2522 [default: 'randn(100,1)'] | |
2523 | |
2524 From Values | |
2525 ----------- | |
2526 | |
2527 Construct an AO from a set of values. | |
2528 | |
2529 'vals' - a set of values. | |
2530 Example: plist('vals', [1 2 3]) | |
2531 optional parameter: repeat 'N' times | |
2532 Example: plist('vals', [1 2 3], 'N', 10) | |
2533 | |
2534 [default: vals: [1], N: [1] ] | |
2535 OR | |
2536 | |
2537 To produce a tsdata AO | |
2538 | |
2539 'xvals' - a set of x values. | |
2540 'yvals' - a set of y values. | |
2541 | |
2542 | |
2543 | |
2544 From Time-series Function | |
2545 ------------------------- | |
2546 | |
2547 Construct an AO from a function of time, t. | |
2548 | |
2549 'tsfcn' - a function of time. | |
2550 | |
2551 You can also specify optional parameters | |
2552 'fs' - sampling frequency [default: 10 Hz] | |
2553 'nsecs' - length in seconds [default: 10 s] | |
2554 | |
2555 You can also specify the initial time (t0) associated with | |
2556 the time-series by passing a parameter 't0' with a value | |
2557 that is a time object [default: time(0)] | |
2558 Example: | |
2559 plist('fs', 10, 'nsecs', 10, ... | |
2560 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
2561 't0', time('1980-12-01 12:43:12')); | |
2562 | |
2563 From Frequency-series Function | |
2564 ------------------------------ | |
2565 | |
2566 Construct an AO from a function of frequency, f. | |
2567 | |
2568 'fsfcn' - a function of frequency, f. [default: 'f'] | |
2569 | |
2570 You can also specify optional parameters: | |
2571 'f1' - the initial frequency [default: 1e-9] | |
2572 'f2' - the final frequency [default: 5] | |
2573 'nf' - the number of frequency samples [default: 1000] | |
2574 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
2575 or provide a frequency vector: | |
2576 'f' - a vector of frequencies on which to evaluate the | |
2577 function [default: [] ] | |
2578 | |
2579 From Window | |
2580 ----------- | |
2581 | |
2582 Construct an AO from a spectral window object. | |
2583 | |
2584 'win' - A specwin object. | |
2585 | |
2586 This creates a cdata type AO containing the window values. | |
2587 Example: plist('win', specwin('Hannning', 100)) | |
2588 | |
2589 [default: specwin('Hanning', 100)] | |
2590 | |
2591 From Waveform | |
2592 ------------- | |
2593 | |
2594 Construct an AO from a waveform description. | |
2595 | |
2596 'waveform' - a waveform description (see options below). | |
2597 | |
2598 You can also specify additional parameters: | |
2599 'fs' - sampling frequency [default: 10 Hz] | |
2600 'nsecs' - length in seconds [default: 10 s] | |
2601 't0' - time-stamp of the first data sample [default time(0)] | |
2602 | |
2603 and, for the following waveform types: | |
2604 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
2605 (can be vectors for sum of sine waves) | |
2606 'A' - Amplitude of the wave | |
2607 'f' - Frequency of the wave | |
2608 'phi' - Phase of the eave | |
2609 'nsecs' - Number of seconds (in seconds) | |
2610 'toff' - Offset of the wave (in seconds) | |
2611 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
2612 'sigma' specify the standard deviation | |
2613 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
2614 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
2615 'Square wave' - 'f', 'duty' (help square) | |
2616 'Sawtooth' - 'f', 'width' (help sawtooth) | |
2617 | |
2618 You can also specify the initial time (t0) associated with | |
2619 the time-series by passing a parameter 't0' with a value | |
2620 that is a time object. | |
2621 | |
2622 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
2623 fs: 10, nsecs: 10, t0: time(0) ] | |
2624 | |
2625 | |
2626 From Repository | |
2627 --------------- | |
2628 | |
2629 Construct an AO by retrieving it from an LTPDA repository. | |
2630 | |
2631 'Hostname' - the repository hostname. Only those objects which | |
2632 are AOs are returned. | |
2633 [default: 'localhost']; | |
2634 | |
2635 Additional parameters: | |
2636 | |
2637 'Database' - The database name [default: 'ltpda'] | |
2638 'ID' - A vector of object IDs. [default: []] | |
2639 'CID' - Retrieve all AO objects from a particular | |
2640 collection. | |
2641 'Binary' - Set to 'yes' to retrieve from stored binary | |
2642 representation (not always available). | |
2643 | |
2644 From Polynomial | |
2645 --------------- | |
2646 | |
2647 Construct an AO from a set of polynomial coefficients. | |
2648 | |
2649 'polyval' - a set of polynomial coefficients. | |
2650 [default: [-0.0001 0.02 -1 -1] ] | |
2651 | |
2652 Additional parameters: | |
2653 'Nsecs' and 'fs' - number of seconds, and sample rate | |
2654 [defaults: nsecs: 10, fs: 10] | |
2655 or 't' - vector of time vertices | |
2656 [default: [] ] | |
2657 | |
2658 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
2659 | |
2660 | |
2661 From Pzmodel | |
2662 ------------ | |
2663 | |
2664 Generates an ao with a timeseries with a prescribed spectrum. | |
2665 p = [pz(f1,q1) pz(f2,q2)] | |
2666 z = [pz(f3,q3)] | |
2667 pzm = pzmodel(gain, p, z) | |
2668 The constructor also needs: fs - sampling frequency | |
2669 nsecs - number of seconds to be generated | |
2670 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
2671 | |
2672 From Model | |
2673 ---------- | |
2674 | |
2675 A collection of built-in models which construct data series and return | |
2676 them in AOs. | |
2677 | |
2678 'Model' - give the model name. To get a list of models: | |
2679 ao(plist('Model', '')) | |
2680 | |
2681 Each model has additional parameters that need to be passed. To see the | |
2682 parameters: | |
2683 >> help ao.<model_name> | |
2684 | |
2685 for example, | |
2686 | |
2687 >> help ao.mdc1_fd_dynamics | |
2688 | |
2689 From Plist | |
2690 ---------- | |
2691 | |
2692 'Plist' - construct from a plist. The value passed should be a plist | |
2693 object. | |
2694 [default: empty plist] | |
2695 | |
2696 | |
2697 | |
2698 Examples: | |
2699 | |
2700 1) Normally distributed random noise time-series | |
2701 | |
2702 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
2703 rd10 = ao(p); | |
2704 | |
2705 | |
2706 Indexing: | |
2707 b = a(1) % where a is an array of analysis objects | |
2708 d = a.data; % get the data object | |
2709 h = a.hist; % get the history object | |
2710 d = a.data.x(1:20); % get a matrix of data values x; | |
2711 | |
2712 2) Timeseries with a prescribed spectrum | |
2713 | |
2714 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
2715 a = ao(p) | |
2716 | |
2717 fs - sampling frequency | |
2718 nsecs - number of seconds in time series | |
2719 ndigits - number of digits for symbolic math toolbox (default: 32) | |
2720 | |
2721 | |
2722 From pzmodel | |
2723 ------------ | |
2724 | |
2725 Generates an ao with a timeseries with a prescribed spectrum. | |
2726 p = [pz(f1,q1) pz(f2,q2)] | |
2727 z = [pz(f3,q3)] | |
2728 pzm = pzmodel(gain, p, z) | |
2729 The constructor also needs: fs - sampling frequency | |
2730 nsecs - number of seconds to be generated | |
2731 a = ao(pzm, nsecs, fs) | |
2732 | |
2733 The following call returns an minfo object that contains information | |
2734 about the AO constructor: | |
2735 | |
2736 >> info = ao.getInfo | |
2737 | |
2738 You can get information about class methods by calling: | |
2739 | |
2740 >> info = ao.getInfo(method) | |
2741 | |
2742 e.g. info = ao.getInfo('psd') | |
2743 | |
2744 You can also restrict the sets of parameters contained in the minfo | |
2745 object by calling: | |
2746 | |
2747 >> info = ao.getInfo(method, set) | |
2748 | |
2749 e.g., info = ao.getInfo('ao', 'From Vals') | |
2750 | |
2751 See also tsdata, fsdata, xydata, cdata, xyzdata | |
2752 | |
2753 M Hewitson 30-01-07 | |
2754 | |
2755 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
2756 </HelpText> | |
2757 <sets> | |
2758 <set name="Default"/> | |
2759 <set name="From XML File"/> | |
2760 <set name="From MAT File"/> | |
2761 <set name="From ASCII File"/> | |
2762 <set name="From Function"/> | |
2763 <set name="From Values"/> | |
2764 <set name="From Time-series Function"/> | |
2765 <set name="From Frequency-series Function"/> | |
2766 <set name="From Window"/> | |
2767 <set name="From Waveform"/> | |
2768 <set name="From Polynomial"/> | |
2769 <set name="From Repository"/> | |
2770 <set name="From Plist"/> | |
2771 <set name="From Pzmodel"/> | |
2772 <set name="From Model"/> | |
2773 </sets> | |
2774 <plists> | |
2775 <plist name="none"/> | |
2776 <plist name="none"> | |
2777 <param> | |
2778 <key>FILENAME</key> | |
2779 <val/> | |
2780 <type>char</type> | |
2781 </param> | |
2782 </plist> | |
2783 <plist name="none"> | |
2784 <param> | |
2785 <key>FILENAME</key> | |
2786 <val/> | |
2787 <type>char</type> | |
2788 </param> | |
2789 </plist> | |
2790 <plist name="none"> | |
2791 <param> | |
2792 <key>FILENAME</key> | |
2793 <val/> | |
2794 <type>char</type> | |
2795 </param> | |
2796 <param> | |
2797 <key>TYPE</key> | |
2798 <val>tsdata</val> | |
2799 <type>char</type> | |
2800 </param> | |
2801 <param> | |
2802 <key>COLUMNS</key> | |
2803 <val>[1 2]</val> | |
2804 <type>double</type> | |
2805 </param> | |
2806 <param> | |
2807 <key>XUNITS</key> | |
2808 <val>[ unit(' s ') ]</val> | |
2809 <type>unit</type> | |
2810 </param> | |
2811 <param> | |
2812 <key>YUNITS</key> | |
2813 <val>[ unit(' ') ]</val> | |
2814 <type>unit</type> | |
2815 </param> | |
2816 <param> | |
2817 <key>T0</key> | |
2818 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
2819 <type>time</type> | |
2820 </param> | |
2821 <param> | |
2822 <key>COMMENT_CHAR</key> | |
2823 <val/> | |
2824 <type>char</type> | |
2825 </param> | |
2826 <param> | |
2827 <key>USE_FS</key> | |
2828 <val/> | |
2829 <type>char</type> | |
2830 </param> | |
2831 <param> | |
2832 <key>ROBUST</key> | |
2833 <val>yes</val> | |
2834 <type>char</type> | |
2835 </param> | |
2836 </plist> | |
2837 <plist name="none"> | |
2838 <param> | |
2839 <key>FCN</key> | |
2840 <val>randn(100,1)</val> | |
2841 <type>char</type> | |
2842 </param> | |
2843 <param> | |
2844 <key>YUNITS</key> | |
2845 <val>[ unit(' ') ]</val> | |
2846 <type>unit</type> | |
2847 </param> | |
2848 </plist> | |
2849 <plist name="none"> | |
2850 <param> | |
2851 <key>VALS</key> | |
2852 <val>[]</val> | |
2853 <type>double</type> | |
2854 </param> | |
2855 <param> | |
2856 <key>N</key> | |
2857 <val>1</val> | |
2858 <type>double</type> | |
2859 </param> | |
2860 <param> | |
2861 <key>DTYPE</key> | |
2862 <val/> | |
2863 <type>char</type> | |
2864 </param> | |
2865 <param> | |
2866 <key>FS</key> | |
2867 <val>[]</val> | |
2868 <type>double</type> | |
2869 </param> | |
2870 <param> | |
2871 <key>XVALS</key> | |
2872 <val>[]</val> | |
2873 <type>double</type> | |
2874 </param> | |
2875 <param> | |
2876 <key>YVALS</key> | |
2877 <val>[]</val> | |
2878 <type>double</type> | |
2879 </param> | |
2880 <param> | |
2881 <key>YUNITS</key> | |
2882 <val/> | |
2883 <type>char</type> | |
2884 </param> | |
2885 </plist> | |
2886 <plist name="none"> | |
2887 <param> | |
2888 <key>TSFCN</key> | |
2889 <val>t</val> | |
2890 <type>char</type> | |
2891 </param> | |
2892 <param> | |
2893 <key>FS</key> | |
2894 <val>10</val> | |
2895 <type>double</type> | |
2896 </param> | |
2897 <param> | |
2898 <key>NSECS</key> | |
2899 <val>1</val> | |
2900 <type>double</type> | |
2901 </param> | |
2902 <param> | |
2903 <key>T0</key> | |
2904 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
2905 <type>time</type> | |
2906 </param> | |
2907 <param> | |
2908 <key>XUNITS</key> | |
2909 <val>[ unit(' s ') ]</val> | |
2910 <type>unit</type> | |
2911 </param> | |
2912 <param> | |
2913 <key>YUNITS</key> | |
2914 <val>[ unit(' ') ]</val> | |
2915 <type>unit</type> | |
2916 </param> | |
2917 </plist> | |
2918 <plist name="none"> | |
2919 <param> | |
2920 <key>FSFCN</key> | |
2921 <val>f</val> | |
2922 <type>char</type> | |
2923 </param> | |
2924 <param> | |
2925 <key>F1</key> | |
2926 <val>1e-09</val> | |
2927 <type>double</type> | |
2928 </param> | |
2929 <param> | |
2930 <key>F2</key> | |
2931 <val>5</val> | |
2932 <type>double</type> | |
2933 </param> | |
2934 <param> | |
2935 <key>NF</key> | |
2936 <val>1000</val> | |
2937 <type>double</type> | |
2938 </param> | |
2939 <param> | |
2940 <key>SCALE</key> | |
2941 <val>log</val> | |
2942 <type>char</type> | |
2943 </param> | |
2944 <param> | |
2945 <key>F</key> | |
2946 <val>[]</val> | |
2947 <type>double</type> | |
2948 </param> | |
2949 <param> | |
2950 <key>XUNITS</key> | |
2951 <val>[ unit(' Hz ') ]</val> | |
2952 <type>unit</type> | |
2953 </param> | |
2954 <param> | |
2955 <key>YUNITS</key> | |
2956 <val>[ unit(' ') ]</val> | |
2957 <type>unit</type> | |
2958 </param> | |
2959 </plist> | |
2960 <plist name="none"> | |
2961 <param> | |
2962 <key>WIN</key> | |
2963 <val> specwin('Hanning', 100)</val> | |
2964 <type>specwin</type> | |
2965 </param> | |
2966 <param> | |
2967 <key>YUNITS</key> | |
2968 <val>[ unit(' ') ]</val> | |
2969 <type>unit</type> | |
2970 </param> | |
2971 </plist> | |
2972 <plist name="none"> | |
2973 <param> | |
2974 <key>WAVEFORM</key> | |
2975 <val>sine wave</val> | |
2976 <type>char</type> | |
2977 </param> | |
2978 <param> | |
2979 <key>A</key> | |
2980 <val>1</val> | |
2981 <type>double</type> | |
2982 </param> | |
2983 <param> | |
2984 <key>F</key> | |
2985 <val>1.23</val> | |
2986 <type>double</type> | |
2987 </param> | |
2988 <param> | |
2989 <key>PHI</key> | |
2990 <val>0</val> | |
2991 <type>double</type> | |
2992 </param> | |
2993 <param> | |
2994 <key>FS</key> | |
2995 <val>10</val> | |
2996 <type>double</type> | |
2997 </param> | |
2998 <param> | |
2999 <key>NSECS</key> | |
3000 <val>10</val> | |
3001 <type>double</type> | |
3002 </param> | |
3003 <param> | |
3004 <key>T0</key> | |
3005 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
3006 <type>time</type> | |
3007 </param> | |
3008 <param> | |
3009 <key>TOFF</key> | |
3010 <val>0</val> | |
3011 <type>double</type> | |
3012 </param> | |
3013 <param> | |
3014 <key>XUNITS</key> | |
3015 <val>[ unit(' s ') ]</val> | |
3016 <type>unit</type> | |
3017 </param> | |
3018 <param> | |
3019 <key>YUNITS</key> | |
3020 <val>[ unit(' ') ]</val> | |
3021 <type>unit</type> | |
3022 </param> | |
3023 </plist> | |
3024 <plist name="none"> | |
3025 <param> | |
3026 <key>POLYVAL</key> | |
3027 <val>[-0.0001 0.02 -1 -1]</val> | |
3028 <type>double</type> | |
3029 </param> | |
3030 <param> | |
3031 <key>NSECS</key> | |
3032 <val>10</val> | |
3033 <type>double</type> | |
3034 </param> | |
3035 <param> | |
3036 <key>FS</key> | |
3037 <val>10</val> | |
3038 <type>double</type> | |
3039 </param> | |
3040 <param> | |
3041 <key>T</key> | |
3042 <val>[]</val> | |
3043 <type>double</type> | |
3044 </param> | |
3045 <param> | |
3046 <key>XUNITS</key> | |
3047 <val>[ unit(' s ') ]</val> | |
3048 <type>unit</type> | |
3049 </param> | |
3050 <param> | |
3051 <key>YUNITS</key> | |
3052 <val>[ unit(' ') ]</val> | |
3053 <type>unit</type> | |
3054 </param> | |
3055 </plist> | |
3056 <plist name="none"> | |
3057 <param> | |
3058 <key>HOSTNAME</key> | |
3059 <val>localhost</val> | |
3060 <type>char</type> | |
3061 </param> | |
3062 <param> | |
3063 <key>DATABASE</key> | |
3064 <val>ltpda</val> | |
3065 <type>char</type> | |
3066 </param> | |
3067 <param> | |
3068 <key>ID</key> | |
3069 <val>[]</val> | |
3070 <type>double</type> | |
3071 </param> | |
3072 <param> | |
3073 <key>BINARY</key> | |
3074 <val>no</val> | |
3075 <type>char</type> | |
3076 </param> | |
3077 </plist> | |
3078 <plist name="none"> | |
3079 <param> | |
3080 <key>PLIST</key> | |
3081 <val>(empty-plist)</val> | |
3082 <type>plist</type> | |
3083 </param> | |
3084 </plist> | |
3085 <plist name="none"> | |
3086 <param> | |
3087 <key>PZMODEL</key> | |
3088 <val>pzmodel(none)</val> | |
3089 <type>pzmodel</type> | |
3090 </param> | |
3091 <param> | |
3092 <key>NSECS</key> | |
3093 <val>0</val> | |
3094 <type>double</type> | |
3095 </param> | |
3096 <param> | |
3097 <key>FS</key> | |
3098 <val>0</val> | |
3099 <type>double</type> | |
3100 </param> | |
3101 <param> | |
3102 <key>XUNITS</key> | |
3103 <val>[ unit(' s ') ]</val> | |
3104 <type>unit</type> | |
3105 </param> | |
3106 <param> | |
3107 <key>YUNITS</key> | |
3108 <val>[ unit(' ') ]</val> | |
3109 <type>unit</type> | |
3110 </param> | |
3111 </plist> | |
3112 <plist name="none"> | |
3113 <param> | |
3114 <key>MODEL</key> | |
3115 <val/> | |
3116 <type>char</type> | |
3117 </param> | |
3118 </plist> | |
3119 </plists> | |
3120 </LTPDAalgorithm> | |
3121 <plist name="none"> | |
3122 <param> | |
3123 <key>PLIST</key> | |
3124 <val>PORT_0</val> | |
3125 <type>Char</type> | |
3126 </param> | |
3127 </plist> | |
3128 <port number="0" terminal="" type="output"> | |
3129 <node> | |
3130 <pipe color="-3657166" dstblock="a8" dstport="0" srcblock="a4" thickness="2.5"/> | |
3131 </node> | |
3132 </port> | |
3133 </block> | |
3134 <block bounds="100 293 58 50" inputs="1" name="lpsd plist" outputs="1"> | |
3135 <LTPDAalgorithm mcategory="Constructor" mclass="plist" mname="plist" mpackage="" mversion="" portdims="1 10 1 10"> | |
3136 <HelpText> PLIST Plist class object constructor. | |
3137 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3138 | |
3139 DESCRIPTION: PLIST Parameter-List Object class object constructor. | |
3140 Create a plist object. | |
3141 | |
3142 SUPER CLASSES: ltpda_uo < ltpda_obj | |
3143 | |
3144 PROPERTIES: | |
3145 | |
3146 Inherit Properties (read only) | |
3147 name - name of object | |
3148 created - creation time (time-object) | |
3149 prov - contains a instance of the provenance class. | |
3150 hist - history of the object (history object) | |
3151 version - cvs-version string. | |
3152 | |
3153 Protected Properties (read only) | |
3154 params - list of param-objects | |
3155 | |
3156 PLIST METHODS: | |
3157 | |
3158 Defined Abstract methods: | |
3159 char - returns one character string which represents the object | |
3160 copy - copies an object | |
3161 display - displays an object | |
3162 string - converts an object to a command string which will | |
3163 recreate the plist object. | |
3164 update_struct - updates a object structure to the current tbx-version | |
3165 | |
3166 Public methods: | |
3167 append - append a param-object, plist-object or a key/value pair to | |
3168 the parameter list. | |
3169 combine - combine multiple parameter lists (plist objects) into a | |
3170 single plist. | |
3171 find - Returns the value corresponding to the first parameters in | |
3172 the list with search-key. | |
3173 isparam - look for a given key in the parameter lists. | |
3174 nparams - returns the number of param objects in the list. | |
3175 pset - set or add a key/value pairor a param-object into | |
3176 the parameter list. | |
3177 pzmresp - shadow function for the pzmodel/resp. | |
3178 remove - remove a parameter from the parameter list. | |
3179 resp - shadows miir/iirResp and pzmodel/resp. | |
3180 | |
3181 CONSTRUCTORS: | |
3182 | |
3183 pl = plist() - create an empty plist object. | |
3184 pl = plist(p) - create a plist with elements p | |
3185 where p is an array of param objects. | |
3186 pl = plist('key', val) - create a plist with the key/value pair | |
3187 pl = plist('key1', val1, ... - create a plist with more key/value pairs | |
3188 'key2', 'val2') | |
3189 pl = plist('file.xml') - load a plist-object from xml-file | |
3190 pl = plist('file.mat') - load a plist-object from mat-file | |
3191 pl = plist(pl) - copies the input plist. | |
3192 | |
3193 PARAMETERS: | |
3194 | |
3195 If no recognised parameters are found in the input plist, the input | |
3196 plist is simply returned. This is the copy constructor. | |
3197 | |
3198 'Hostname' - construct a plist by retrieving it from an LTPDA repository | |
3199 specified by the given hostname. Only those objects which | |
3200 are plists are returned. | |
3201 Additional parameters: | |
3202 'Database' - The database name [default: 'ltpda'] | |
3203 'ID' - A vector of object IDs. | |
3204 'CID' - Retrieve all plists from a particular | |
3205 collection. | |
3206 'Binary' - Set to 'yes' to retrieve from stored binary | |
3207 representation (not always available). | |
3208 | |
3209 M-FILE INFO: The following call returns an minfo object that contains | |
3210 information about the plist constructor: | |
3211 >> info = plist.getInfo | |
3212 or >> info = plist.getInfo('plist') | |
3213 | |
3214 You can get information about class methods by calling: | |
3215 >> info = plist.getInfo(method) | |
3216 e.g. >> info = plist.getInfo('eq') | |
3217 | |
3218 You can also restrict the sets of parameters contained in | |
3219 the minfo object by calling: | |
3220 >> info = plist.getInfo(method, set) | |
3221 e.g. >> info = plist.getInfo('plist', 'Default') | |
3222 | |
3223 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3224 | |
3225 HISTORY: 30-01-07 M Hewitson | |
3226 Creation | |
3227 | |
3228 SEE ALSO: ltpda_obj, ltpda_uo, param | |
3229 | |
3230 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3231 </HelpText> | |
3232 <sets> | |
3233 <set name="Default"/> | |
3234 <set name="From Repository"/> | |
3235 <set name="From MAT File"/> | |
3236 </sets> | |
3237 <plists> | |
3238 <plist name="none"> | |
3239 <param> | |
3240 <key>Nsecs</key> | |
3241 <val>100</val> | |
3242 <type>Char</type> | |
3243 </param> | |
3244 <param> | |
3245 <key>fs</key> | |
3246 <val>10</val> | |
3247 <type>Char</type> | |
3248 </param> | |
3249 <param> | |
3250 <key>tsfcn</key> | |
3251 <val>randn(size(t))</val> | |
3252 <type>Char</type> | |
3253 </param> | |
3254 </plist> | |
3255 <plist name="none"> | |
3256 <param> | |
3257 <key>HOSTNAME</key> | |
3258 <val>localhost</val> | |
3259 <type>char</type> | |
3260 </param> | |
3261 <param> | |
3262 <key>DATABASE</key> | |
3263 <val>ltpda</val> | |
3264 <type>char</type> | |
3265 </param> | |
3266 <param> | |
3267 <key>ID</key> | |
3268 <val>[]</val> | |
3269 <type>double</type> | |
3270 </param> | |
3271 <param> | |
3272 <key>BINARY</key> | |
3273 <val>no</val> | |
3274 <type>char</type> | |
3275 </param> | |
3276 </plist> | |
3277 <plist name="none"> | |
3278 <param> | |
3279 <key>FILENAME</key> | |
3280 <val/> | |
3281 <type>char</type> | |
3282 </param> | |
3283 </plist> | |
3284 </plists> | |
3285 </LTPDAalgorithm> | |
3286 <plist name="none"> | |
3287 <param> | |
3288 <key>Kdes</key> | |
3289 <val>100</val> | |
3290 <type>Char</type> | |
3291 </param> | |
3292 <param> | |
3293 <key>Jdes</key> | |
3294 <val>1000</val> | |
3295 <type>Char</type> | |
3296 </param> | |
3297 <param> | |
3298 <key>Order</key> | |
3299 <val>1</val> | |
3300 <type>Char</type> | |
3301 </param> | |
3302 </plist> | |
3303 <port number="0" terminal="" type="output"> | |
3304 <node> | |
3305 <pipe color="-26113" dstblock="a5" dstport="1" srcblock="lpsd plist" thickness="2.5"/> | |
3306 <pipe color="-26113" dstblock="a6" dstport="1" srcblock="lpsd plist" thickness="2.5"/> | |
3307 <pipe color="-26113" dstblock="a7" dstport="1" srcblock="lpsd plist" thickness="2.5"/> | |
3308 <pipe color="-26113" dstblock="a8" dstport="1" srcblock="lpsd plist" thickness="2.5"/> | |
3309 </node> | |
3310 </port> | |
3311 </block> | |
3312 <block bounds="186 22 54 55" inputs="2" name="a5" outputs="1"> | |
3313 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="lpsd" mpackage="" mversion="" portdims="1 10 1 10"> | |
3314 <HelpText> LPSD implement the LPSD algorithm for analysis objects. | |
3315 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3316 | |
3317 DESCRIPTION: LPSD implement the LPSD algorithm for analysis objects. | |
3318 | |
3319 CALL: bs = lpsd(as) | |
3320 | |
3321 INPUTS: as - array of analysis objects | |
3322 pl - parameter list (see below) | |
3323 | |
3324 OUTPUTS: bs - array of analysis objects, one for each input | |
3325 | |
3326 PARAMETER LIST: | |
3327 | |
3328 Kdes - desired number of averages (default 100) | |
3329 Lmin - minimum segment length (default 0) | |
3330 Jdes - number of spectral frequencies to compute (default fs/2) | |
3331 win - a specwin window object | |
3332 Only the design parameters of the window object are used; the | |
3333 window is recomputed for each DFT length inside the lpsd_core | |
3334 algorithm. | |
3335 Olap - desired overlap percentage (default: taken from window) | |
3336 Order - order of detrending | |
3337 -1 - no detrending | |
3338 0 - subtract mean | |
3339 1 - subtract linear fit | |
3340 N - subtract fit of polynomial, order N | |
3341 Scale - Scaling of output. Choose from: | |
3342 AS - Amplitude (linear) Spectrum | |
3343 ASD - Amplitude (linear) Spectral Density | |
3344 PS - Power Spectrum | |
3345 PSD - Power Spectral Density [default] | |
3346 | |
3347 M-FILE INFO: Get information about this methods by calling | |
3348 >> ao.getInfo('lpsd') | |
3349 | |
3350 Get information about a specified set-plist by calling: | |
3351 >> ao.getInfo('lpsd', 'None') | |
3352 | |
3353 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3354 | |
3355 HISTORY: 02-02-07 M Hewitson | |
3356 Created | |
3357 | |
3358 References: "Improved spectrum estimation from digitized time series | |
3359 on a logarithmic frequency axis", Michael Troebs, Gerhard Heinzel, | |
3360 Measurement 39 (2006) 120-129. | |
3361 | |
3362 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3363 </HelpText> | |
3364 <sets> | |
3365 <set name="Default"/> | |
3366 </sets> | |
3367 <plists> | |
3368 <plist name="none"> | |
3369 <param> | |
3370 <key>KDES</key> | |
3371 <val>100</val> | |
3372 <type>double</type> | |
3373 </param> | |
3374 <param> | |
3375 <key>JDES</key> | |
3376 <val>1000</val> | |
3377 <type>double</type> | |
3378 </param> | |
3379 <param> | |
3380 <key>LMIN</key> | |
3381 <val>0</val> | |
3382 <type>double</type> | |
3383 </param> | |
3384 <param> | |
3385 <key>WIN</key> | |
3386 <val> specwin('BH92', 10)</val> | |
3387 <type>specwin</type> | |
3388 </param> | |
3389 <param> | |
3390 <key>OLAP</key> | |
3391 <val>-1</val> | |
3392 <type>double</type> | |
3393 </param> | |
3394 <param> | |
3395 <key>ORDER</key> | |
3396 <val>0</val> | |
3397 <type>double</type> | |
3398 </param> | |
3399 <param> | |
3400 <key>SCALE</key> | |
3401 <val>PSD</val> | |
3402 <type>char</type> | |
3403 </param> | |
3404 </plist> | |
3405 </plists> | |
3406 </LTPDAalgorithm> | |
3407 <plist name="none"> | |
3408 <param> | |
3409 <key>PLIST</key> | |
3410 <val>PORT_1</val> | |
3411 <type>Char</type> | |
3412 </param> | |
3413 </plist> | |
3414 <port number="0" terminal="" type="output"> | |
3415 <node> | |
3416 <pipe color="-3657166" dstblock="a9" dstport="0" srcblock="a5" thickness="2.5"/> | |
3417 </node> | |
3418 </port> | |
3419 </block> | |
3420 <block bounds="188 88 54 56" inputs="2" name="a6" outputs="1"> | |
3421 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="lpsd" mpackage="" mversion="" portdims="1 10 1 10"> | |
3422 <HelpText> LPSD implement the LPSD algorithm for analysis objects. | |
3423 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3424 | |
3425 DESCRIPTION: LPSD implement the LPSD algorithm for analysis objects. | |
3426 | |
3427 CALL: bs = lpsd(as) | |
3428 | |
3429 INPUTS: as - array of analysis objects | |
3430 pl - parameter list (see below) | |
3431 | |
3432 OUTPUTS: bs - array of analysis objects, one for each input | |
3433 | |
3434 PARAMETER LIST: | |
3435 | |
3436 Kdes - desired number of averages (default 100) | |
3437 Lmin - minimum segment length (default 0) | |
3438 Jdes - number of spectral frequencies to compute (default fs/2) | |
3439 win - a specwin window object | |
3440 Only the design parameters of the window object are used; the | |
3441 window is recomputed for each DFT length inside the lpsd_core | |
3442 algorithm. | |
3443 Olap - desired overlap percentage (default: taken from window) | |
3444 Order - order of detrending | |
3445 -1 - no detrending | |
3446 0 - subtract mean | |
3447 1 - subtract linear fit | |
3448 N - subtract fit of polynomial, order N | |
3449 Scale - Scaling of output. Choose from: | |
3450 AS - Amplitude (linear) Spectrum | |
3451 ASD - Amplitude (linear) Spectral Density | |
3452 PS - Power Spectrum | |
3453 PSD - Power Spectral Density [default] | |
3454 | |
3455 M-FILE INFO: Get information about this methods by calling | |
3456 >> ao.getInfo('lpsd') | |
3457 | |
3458 Get information about a specified set-plist by calling: | |
3459 >> ao.getInfo('lpsd', 'None') | |
3460 | |
3461 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3462 | |
3463 HISTORY: 02-02-07 M Hewitson | |
3464 Created | |
3465 | |
3466 References: "Improved spectrum estimation from digitized time series | |
3467 on a logarithmic frequency axis", Michael Troebs, Gerhard Heinzel, | |
3468 Measurement 39 (2006) 120-129. | |
3469 | |
3470 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3471 </HelpText> | |
3472 <sets> | |
3473 <set name="Default"/> | |
3474 </sets> | |
3475 <plists> | |
3476 <plist name="none"> | |
3477 <param> | |
3478 <key>KDES</key> | |
3479 <val>100</val> | |
3480 <type>double</type> | |
3481 </param> | |
3482 <param> | |
3483 <key>JDES</key> | |
3484 <val>1000</val> | |
3485 <type>double</type> | |
3486 </param> | |
3487 <param> | |
3488 <key>LMIN</key> | |
3489 <val>0</val> | |
3490 <type>double</type> | |
3491 </param> | |
3492 <param> | |
3493 <key>WIN</key> | |
3494 <val> specwin('BH92', 10)</val> | |
3495 <type>specwin</type> | |
3496 </param> | |
3497 <param> | |
3498 <key>OLAP</key> | |
3499 <val>-1</val> | |
3500 <type>double</type> | |
3501 </param> | |
3502 <param> | |
3503 <key>ORDER</key> | |
3504 <val>0</val> | |
3505 <type>double</type> | |
3506 </param> | |
3507 <param> | |
3508 <key>SCALE</key> | |
3509 <val>PSD</val> | |
3510 <type>char</type> | |
3511 </param> | |
3512 </plist> | |
3513 </plists> | |
3514 </LTPDAalgorithm> | |
3515 <plist name="none"> | |
3516 <param> | |
3517 <key>PLIST</key> | |
3518 <val>PORT_1</val> | |
3519 <type>Char</type> | |
3520 </param> | |
3521 </plist> | |
3522 <port number="0" terminal="" type="output"> | |
3523 <node> | |
3524 <pipe color="-3657166" dstblock="a9" dstport="1" srcblock="a6" thickness="2.5"/> | |
3525 </node> | |
3526 </port> | |
3527 </block> | |
3528 <block bounds="188 149 58 54" inputs="2" name="a7" outputs="1"> | |
3529 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="lpsd" mpackage="" mversion="" portdims="1 10 1 10"> | |
3530 <HelpText> LPSD implement the LPSD algorithm for analysis objects. | |
3531 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3532 | |
3533 DESCRIPTION: LPSD implement the LPSD algorithm for analysis objects. | |
3534 | |
3535 CALL: bs = lpsd(as) | |
3536 | |
3537 INPUTS: as - array of analysis objects | |
3538 pl - parameter list (see below) | |
3539 | |
3540 OUTPUTS: bs - array of analysis objects, one for each input | |
3541 | |
3542 PARAMETER LIST: | |
3543 | |
3544 Kdes - desired number of averages (default 100) | |
3545 Lmin - minimum segment length (default 0) | |
3546 Jdes - number of spectral frequencies to compute (default fs/2) | |
3547 win - a specwin window object | |
3548 Only the design parameters of the window object are used; the | |
3549 window is recomputed for each DFT length inside the lpsd_core | |
3550 algorithm. | |
3551 Olap - desired overlap percentage (default: taken from window) | |
3552 Order - order of detrending | |
3553 -1 - no detrending | |
3554 0 - subtract mean | |
3555 1 - subtract linear fit | |
3556 N - subtract fit of polynomial, order N | |
3557 Scale - Scaling of output. Choose from: | |
3558 AS - Amplitude (linear) Spectrum | |
3559 ASD - Amplitude (linear) Spectral Density | |
3560 PS - Power Spectrum | |
3561 PSD - Power Spectral Density [default] | |
3562 | |
3563 M-FILE INFO: Get information about this methods by calling | |
3564 >> ao.getInfo('lpsd') | |
3565 | |
3566 Get information about a specified set-plist by calling: | |
3567 >> ao.getInfo('lpsd', 'None') | |
3568 | |
3569 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3570 | |
3571 HISTORY: 02-02-07 M Hewitson | |
3572 Created | |
3573 | |
3574 References: "Improved spectrum estimation from digitized time series | |
3575 on a logarithmic frequency axis", Michael Troebs, Gerhard Heinzel, | |
3576 Measurement 39 (2006) 120-129. | |
3577 | |
3578 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3579 </HelpText> | |
3580 <sets> | |
3581 <set name="Default"/> | |
3582 </sets> | |
3583 <plists> | |
3584 <plist name="none"> | |
3585 <param> | |
3586 <key>KDES</key> | |
3587 <val>100</val> | |
3588 <type>double</type> | |
3589 </param> | |
3590 <param> | |
3591 <key>JDES</key> | |
3592 <val>1000</val> | |
3593 <type>double</type> | |
3594 </param> | |
3595 <param> | |
3596 <key>LMIN</key> | |
3597 <val>0</val> | |
3598 <type>double</type> | |
3599 </param> | |
3600 <param> | |
3601 <key>WIN</key> | |
3602 <val> specwin('BH92', 10)</val> | |
3603 <type>specwin</type> | |
3604 </param> | |
3605 <param> | |
3606 <key>OLAP</key> | |
3607 <val>-1</val> | |
3608 <type>double</type> | |
3609 </param> | |
3610 <param> | |
3611 <key>ORDER</key> | |
3612 <val>0</val> | |
3613 <type>double</type> | |
3614 </param> | |
3615 <param> | |
3616 <key>SCALE</key> | |
3617 <val>PSD</val> | |
3618 <type>char</type> | |
3619 </param> | |
3620 </plist> | |
3621 </plists> | |
3622 </LTPDAalgorithm> | |
3623 <plist name="none"> | |
3624 <param> | |
3625 <key>PLIST</key> | |
3626 <val>PORT_1</val> | |
3627 <type>Char</type> | |
3628 </param> | |
3629 </plist> | |
3630 <port number="0" terminal="" type="output"> | |
3631 <node> | |
3632 <pipe color="-3657166" dstblock="a10" dstport="1" srcblock="a7" thickness="2.5"/> | |
3633 </node> | |
3634 </port> | |
3635 </block> | |
3636 <block bounds="188 211 52 59" inputs="2" name="a8" outputs="1"> | |
3637 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="lpsd" mpackage="" mversion="" portdims="1 10 1 10"> | |
3638 <HelpText> LPSD implement the LPSD algorithm for analysis objects. | |
3639 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3640 | |
3641 DESCRIPTION: LPSD implement the LPSD algorithm for analysis objects. | |
3642 | |
3643 CALL: bs = lpsd(as) | |
3644 | |
3645 INPUTS: as - array of analysis objects | |
3646 pl - parameter list (see below) | |
3647 | |
3648 OUTPUTS: bs - array of analysis objects, one for each input | |
3649 | |
3650 PARAMETER LIST: | |
3651 | |
3652 Kdes - desired number of averages (default 100) | |
3653 Lmin - minimum segment length (default 0) | |
3654 Jdes - number of spectral frequencies to compute (default fs/2) | |
3655 win - a specwin window object | |
3656 Only the design parameters of the window object are used; the | |
3657 window is recomputed for each DFT length inside the lpsd_core | |
3658 algorithm. | |
3659 Olap - desired overlap percentage (default: taken from window) | |
3660 Order - order of detrending | |
3661 -1 - no detrending | |
3662 0 - subtract mean | |
3663 1 - subtract linear fit | |
3664 N - subtract fit of polynomial, order N | |
3665 Scale - Scaling of output. Choose from: | |
3666 AS - Amplitude (linear) Spectrum | |
3667 ASD - Amplitude (linear) Spectral Density | |
3668 PS - Power Spectrum | |
3669 PSD - Power Spectral Density [default] | |
3670 | |
3671 M-FILE INFO: Get information about this methods by calling | |
3672 >> ao.getInfo('lpsd') | |
3673 | |
3674 Get information about a specified set-plist by calling: | |
3675 >> ao.getInfo('lpsd', 'None') | |
3676 | |
3677 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3678 | |
3679 HISTORY: 02-02-07 M Hewitson | |
3680 Created | |
3681 | |
3682 References: "Improved spectrum estimation from digitized time series | |
3683 on a logarithmic frequency axis", Michael Troebs, Gerhard Heinzel, | |
3684 Measurement 39 (2006) 120-129. | |
3685 | |
3686 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3687 </HelpText> | |
3688 <sets> | |
3689 <set name="Default"/> | |
3690 </sets> | |
3691 <plists> | |
3692 <plist name="none"> | |
3693 <param> | |
3694 <key>KDES</key> | |
3695 <val>100</val> | |
3696 <type>double</type> | |
3697 </param> | |
3698 <param> | |
3699 <key>JDES</key> | |
3700 <val>1000</val> | |
3701 <type>double</type> | |
3702 </param> | |
3703 <param> | |
3704 <key>LMIN</key> | |
3705 <val>0</val> | |
3706 <type>double</type> | |
3707 </param> | |
3708 <param> | |
3709 <key>WIN</key> | |
3710 <val> specwin('BH92', 10)</val> | |
3711 <type>specwin</type> | |
3712 </param> | |
3713 <param> | |
3714 <key>OLAP</key> | |
3715 <val>-1</val> | |
3716 <type>double</type> | |
3717 </param> | |
3718 <param> | |
3719 <key>ORDER</key> | |
3720 <val>0</val> | |
3721 <type>double</type> | |
3722 </param> | |
3723 <param> | |
3724 <key>SCALE</key> | |
3725 <val>PSD</val> | |
3726 <type>char</type> | |
3727 </param> | |
3728 </plist> | |
3729 </plists> | |
3730 </LTPDAalgorithm> | |
3731 <plist name="none"> | |
3732 <param> | |
3733 <key>PLIST</key> | |
3734 <val>PORT_1</val> | |
3735 <type>Char</type> | |
3736 </param> | |
3737 </plist> | |
3738 <port number="0" terminal="" type="output"> | |
3739 <node> | |
3740 <pipe color="-3657166" dstblock="a11" dstport="1" srcblock="a8" thickness="2.5"/> | |
3741 </node> | |
3742 </port> | |
3743 </block> | |
3744 <block bounds="271 50 61 60" inputs="2" name="a9" outputs="1"> | |
3745 <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="plus" mpackage="" mversion="" portdims="1 10 1 10"> | |
3746 <HelpText> PLUS implements addition operator for analysis objects. | |
3747 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3748 | |
3749 DESCRIPTION: PLUS implements addition operator for two analysis objects. | |
3750 | |
3751 CALL: a = a1+scalar | |
3752 a = a1+a2 | |
3753 | |
3754 M-FILE INFO: Get information about this methods by calling | |
3755 >> ao.getInfo('plus') | |
3756 | |
3757 Get information about a specified set-plist by calling: | |
3758 >> ao.getInfo('plus', 'None') | |
3759 | |
3760 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3761 | |
3762 HISTORY: 01-02-07 M Hewitson | |
3763 Creation | |
3764 | |
3765 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3766 </HelpText> | |
3767 <sets> | |
3768 <set name="Default"/> | |
3769 </sets> | |
3770 <plists> | |
3771 <plist name="none"/> | |
3772 </plists> | |
3773 </LTPDAalgorithm> | |
3774 <plist name="none"/> | |
3775 <port number="0" terminal="" type="output"> | |
3776 <node> | |
3777 <pipe color="-3657166" dstblock="a10" dstport="0" srcblock="a9" thickness="2.5"/> | |
3778 </node> | |
3779 </port> | |
3780 </block> | |
3781 <block bounds="350 92 49 50" inputs="2" name="a10" outputs="1"> | |
3782 <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="times" mpackage="" mversion="" portdims="1 10 1 10"> | |
3783 <HelpText> TIMES implements times operator for analysis objects. | |
3784 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3785 | |
3786 DESCRIPTION: TIMES implements times operator for analysis objects. | |
3787 | |
3788 CALL: a = a1.*scalar | |
3789 a = a1.*a2 | |
3790 | |
3791 M-FILE INFO: Get information about this methods by calling | |
3792 >> ao.getInfo('times') | |
3793 | |
3794 Get information about a specified set-plist by calling: | |
3795 >> ao.getInfo('times', 'None') | |
3796 | |
3797 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3798 | |
3799 HISTORY: 01-02-07 M Hewitson | |
3800 Creation | |
3801 | |
3802 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3803 </HelpText> | |
3804 <sets> | |
3805 <set name="Default"/> | |
3806 </sets> | |
3807 <plists> | |
3808 <plist name="none"/> | |
3809 </plists> | |
3810 </LTPDAalgorithm> | |
3811 <plist name="none"/> | |
3812 <port number="0" terminal="" type="output"> | |
3813 <node> | |
3814 <pipe color="-3657166" dstblock="a11" dstport="0" srcblock="a10" thickness="2.5"/> | |
3815 </node> | |
3816 </port> | |
3817 </block> | |
3818 <block bounds="407 131 48 49" inputs="2" name="a11" outputs="1"> | |
3819 <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="times" mpackage="" mversion="" portdims="1 10 1 10"> | |
3820 <HelpText> TIMES implements times operator for analysis objects. | |
3821 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3822 | |
3823 DESCRIPTION: TIMES implements times operator for analysis objects. | |
3824 | |
3825 CALL: a = a1.*scalar | |
3826 a = a1.*a2 | |
3827 | |
3828 M-FILE INFO: Get information about this methods by calling | |
3829 >> ao.getInfo('times') | |
3830 | |
3831 Get information about a specified set-plist by calling: | |
3832 >> ao.getInfo('times', 'None') | |
3833 | |
3834 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
3835 | |
3836 HISTORY: 01-02-07 M Hewitson | |
3837 Creation | |
3838 | |
3839 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3840 </HelpText> | |
3841 <sets> | |
3842 <set name="Default"/> | |
3843 </sets> | |
3844 <plists> | |
3845 <plist name="none"/> | |
3846 </plists> | |
3847 </LTPDAalgorithm> | |
3848 <plist name="none"/> | |
3849 <port number="0" terminal="" type="output"> | |
3850 <node> | |
3851 <pipe color="-3657166" dstblock="New Block" dstport="0" srcblock="a11" thickness="2.5"/> | |
3852 </node> | |
3853 </port> | |
3854 </block> | |
3855 <block bounds="479 132 45 46" inputs="1" name="New Block" outputs="1"> | |
3856 <LTPDAalgorithm mcategory="Output" mclass="ao" mname="iplot" mpackage="" mversion="" portdims="1 10 1 10"> | |
3857 <HelpText> IPLOT provides an intelligent plotting tool for LTPDA. | |
3858 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3859 | |
3860 DESCRIPTION: IPLOT provides an intelligent plotting tool for LTPDA. | |
3861 | |
3862 CALL: hfig = iplot (a,pl) | |
3863 [hfig, hax] = iplot (a,pl) | |
3864 [hfig, hax, hli] = iplot (a,pl) | |
3865 | |
3866 INPUTS: pl - a parameter list | |
3867 a - input analysis object | |
3868 | |
3869 OUTPUTS: hfig - handles to figures | |
3870 hax - handles to axes | |
3871 hli - handles to lines | |
3872 | |
3873 | |
3874 Plot parameters: | |
3875 | |
3876 'Arrangement' - select the plot layout: | |
3877 'single' - plots all AOs on individual figures | |
3878 'stacked' - plots all AOs on the same axes [default] | |
3879 'subplots' - plots all AOs on subplots | |
3880 | |
3881 'Function' - specify the plot function: | |
3882 'plot', 'stairs', 'stem' | |
3883 [default: 'plot'] | |
3884 *** doesn't work for xyzdata AOs | |
3885 | |
3886 Line parameters: | |
3887 | |
3888 The following properties take cell array values. If the length of | |
3889 the cell array is shorter than the number of lines to plot, the | |
3890 remaining lines will be plotted with the default options. If the | |
3891 cell array is of length 2 and the first cell contains the string | |
3892 'all', then the second cell is used to set the propery of all | |
3893 lines. | |
3894 | |
3895 'LineColors' - a cell array of color definitions for each line. | |
3896 | |
3897 'LineStyles' - a cell array of line styles. | |
3898 | |
3899 'Markers' - a cell array of markers. | |
3900 | |
3901 'LineWidths' - a cell array of line widths. If the length of the | |
3902 cell array is shorter than the number of lines to | |
3903 plot, the remaining lines will be plotted with | |
3904 the default line width. | |
3905 | |
3906 Axes parameters: | |
3907 | |
3908 'Legends' - specify a cell array of strings to be used for | |
3909 the plot legends. If a cell contains an empty | |
3910 string, the default legend string is built. | |
3911 If a single string 'off' is given instead of a | |
3912 cell array, then the legends are all switched | |
3913 off. | |
3914 | |
3915 'XLabels' - Specify the labels to be used on the x-axes. The | |
3916 units are added from the data object 'xunits' | |
3917 property. | |
3918 | |
3919 'YLabels' - Specify the labels to be used on the y-axes. The | |
3920 units are added from the data object 'yunits' | |
3921 property. If the object contains complex data, | |
3922 you should specify two y-labels for that object. | |
3923 | |
3924 The following axis properties also work with the 'all' keyword as | |
3925 described above in the line properties section. | |
3926 | |
3927 'XScales' - Specify the scales to be used on the x-axes. | |
3928 | |
3929 'YScales' - Specify the scales to the used on the y-axes. If | |
3930 an object contains complex data, you should | |
3931 specify two y-labels for that object. | |
3932 | |
3933 'XRanges' - Specify the ranges to be displayed on the x-axes. | |
3934 | |
3935 'YRanges' - Specify the ranges to the displayed on the | |
3936 y-axes. | |
3937 | |
3938 Error parameters: If you give more than one input AO then you must | |
3939 specify the following parameter values in a cell-array, | |
3940 one cell for each input AO. Leave the cell empty to | |
3941 plot no errors. Each error can be a value or a vector | |
3942 the same length as the data vector. If you give and | |
3943 upper limit but not lower limit, then the errors are | |
3944 assumed to be symmetric (and vice versa) | |
3945 | |
3946 'XerrL' - lower bound error values for the X data points. | |
3947 'XerrU' - upper bound error values for the X data points. | |
3948 'YerrL' - lower bound error values for the Y data points. | |
3949 'YerrU' - upper bound error values for the Y data points. | |
3950 | |
3951 Math operations: You can specify rudimentary math operations to be | |
3952 performed on the X and Y data prior to plotting. The | |
3953 'all' keyword is also supported by these parameters. | |
3954 | |
3955 'Xmaths' - specify math operations to perform on the | |
3956 data vector 'x'. For example, | |
3957 plist('Xmaths', 'abs(x)'). | |
3958 | |
3959 'Ymaths' - specify math operations to perform on the | |
3960 data vector 'y'. For example, | |
3961 plist('Ymaths', 'sqrt(y)'). | |
3962 | |
3963 Time-series parameters: in addition to the general options, time-series | |
3964 objects have the following additional parameters. | |
3965 | |
3966 'Xunits' - specify the units on the x-axis as | |
3967 'us' - microseconds | |
3968 'ms' - milliseconds | |
3969 's' - seconds [default] | |
3970 'm' - minutes | |
3971 'h' - hours | |
3972 'D' - days | |
3973 'M' - months | |
3974 'HH:MM:SS' - using a date/time format | |
3975 recognized by datetic (help datetic) | |
3976 | |
3977 | |
3978 Frequency-series parameters: | |
3979 | |
3980 'complexPlotType' - specify how to plot complex data. | |
3981 Choose from: | |
3982 - 'realimag' | |
3983 - 'absdeg' | |
3984 - 'absrad' | |
3985 | |
3986 EXAMPLES: | |
3987 | |
3988 1) Plot two time-series AOs with different colors, line styles, and widths | |
3989 | |
3990 pl = plist('Linecolors', {'g', 'k'}, 'LineStyles', {'', '--'}, 'LineWidths', {1, 4}); | |
3991 iplot(tsao1, tsao2, pl); | |
3992 | |
3993 2) Plot two time-series AOs in subplots. Also override the second legend | |
3994 text and the first line style. | |
3995 | |
3996 pl = plist('Arrangement', 'subplots', 'LineStyles', {'--'}, 'Legends', {'', 'My Sine Wave'}); | |
3997 iplot(tsao1, tsao2, pl); | |
3998 | |
3999 3) Plot two time-series AOs taking the square of the y-values of the | |
4000 first AO and the log of the x-values of the second AO. | |
4001 | |
4002 pl = plist('Arrangement', 'subplots', 'YMaths', 'y.^2', 'XMaths', {'', 'log(x)'}); | |
4003 iplot(tsao1, tsao2, pl); | |
4004 | |
4005 4) Plot two frequency-series AOs on subplots with the same Y-scales and | |
4006 Y-ranges | |
4007 | |
4008 pl1 = plist('Yscales', {'All', 'lin'}); | |
4009 pl2 = plist('arrangement', 'subplots', 'YRanges', {'All', [1e-6 100]}); | |
4010 iplot(fsd1, fsd2, pl1, pl2) | |
4011 | |
4012 | |
4013 M-FILE INFO: Get information about this methods by calling | |
4014 >> ao.getInfo('iplot') | |
4015 | |
4016 Get information about a specified set-plist by calling: | |
4017 >> ao.getInfo('iplot', 'None') | |
4018 | |
4019 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
4020 | |
4021 HISTORY: 22-12-07 M Hewitson | |
4022 Creation | |
4023 | |
4024 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
4025 </HelpText> | |
4026 <sets> | |
4027 <set name="Time-series plot"/> | |
4028 <set name="Frequency-series plot"/> | |
4029 <set name="Y data plot"/> | |
4030 <set name="X-Y data plot"/> | |
4031 <set name="3D plot"/> | |
4032 </sets> | |
4033 <plists> | |
4034 <plist name="none"> | |
4035 <param> | |
4036 <key>COLORS</key> | |
4037 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
4038 <type>cell</type> | |
4039 </param> | |
4040 <param> | |
4041 <key>ARRANGEMENT</key> | |
4042 <val>stacked</val> | |
4043 <type>char</type> | |
4044 </param> | |
4045 <param> | |
4046 <key>FUNCTION</key> | |
4047 <val>plot</val> | |
4048 <type>char</type> | |
4049 </param> | |
4050 <param> | |
4051 <key>LEGENDLOCATION</key> | |
4052 <val>NorthEast</val> | |
4053 <type>char</type> | |
4054 </param> | |
4055 <param> | |
4056 <key>XERRL</key> | |
4057 <val>[]</val> | |
4058 <type>double</type> | |
4059 </param> | |
4060 <param> | |
4061 <key>XERRU</key> | |
4062 <val>[]</val> | |
4063 <type>double</type> | |
4064 </param> | |
4065 <param> | |
4066 <key>YERRU</key> | |
4067 <val>[]</val> | |
4068 <type>double</type> | |
4069 </param> | |
4070 <param> | |
4071 <key>YERRL</key> | |
4072 <val>[]</val> | |
4073 <type>double</type> | |
4074 </param> | |
4075 <param> | |
4076 <key>XLABEL</key> | |
4077 <val>Time</val> | |
4078 <type>char</type> | |
4079 </param> | |
4080 <param> | |
4081 <key>YLABEL</key> | |
4082 <val>Amplitude</val> | |
4083 <type>char</type> | |
4084 </param> | |
4085 </plist> | |
4086 <plist name="none"> | |
4087 <param> | |
4088 <key>COLORS</key> | |
4089 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
4090 <type>cell</type> | |
4091 </param> | |
4092 <param> | |
4093 <key>ARRANGEMENT</key> | |
4094 <val>stacked</val> | |
4095 <type>char</type> | |
4096 </param> | |
4097 <param> | |
4098 <key>FUNCTION</key> | |
4099 <val>plot</val> | |
4100 <type>char</type> | |
4101 </param> | |
4102 <param> | |
4103 <key>LEGENDLOCATION</key> | |
4104 <val>NorthEast</val> | |
4105 <type>char</type> | |
4106 </param> | |
4107 <param> | |
4108 <key>XERRL</key> | |
4109 <val>[]</val> | |
4110 <type>double</type> | |
4111 </param> | |
4112 <param> | |
4113 <key>XERRU</key> | |
4114 <val>[]</val> | |
4115 <type>double</type> | |
4116 </param> | |
4117 <param> | |
4118 <key>YERRU</key> | |
4119 <val>[]</val> | |
4120 <type>double</type> | |
4121 </param> | |
4122 <param> | |
4123 <key>YERRL</key> | |
4124 <val>[]</val> | |
4125 <type>double</type> | |
4126 </param> | |
4127 <param> | |
4128 <key>COMPLEXPLOTTYPE</key> | |
4129 <val>absdeg</val> | |
4130 <type>char</type> | |
4131 </param> | |
4132 <param> | |
4133 <key>XLABEL</key> | |
4134 <val>Frequency</val> | |
4135 <type>char</type> | |
4136 </param> | |
4137 </plist> | |
4138 <plist name="none"> | |
4139 <param> | |
4140 <key>COLORS</key> | |
4141 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
4142 <type>cell</type> | |
4143 </param> | |
4144 <param> | |
4145 <key>ARRANGEMENT</key> | |
4146 <val>stacked</val> | |
4147 <type>char</type> | |
4148 </param> | |
4149 <param> | |
4150 <key>FUNCTION</key> | |
4151 <val>plot</val> | |
4152 <type>char</type> | |
4153 </param> | |
4154 <param> | |
4155 <key>LEGENDLOCATION</key> | |
4156 <val>NorthEast</val> | |
4157 <type>char</type> | |
4158 </param> | |
4159 <param> | |
4160 <key>XERRL</key> | |
4161 <val>[]</val> | |
4162 <type>double</type> | |
4163 </param> | |
4164 <param> | |
4165 <key>XERRU</key> | |
4166 <val>[]</val> | |
4167 <type>double</type> | |
4168 </param> | |
4169 <param> | |
4170 <key>YERRU</key> | |
4171 <val>[]</val> | |
4172 <type>double</type> | |
4173 </param> | |
4174 <param> | |
4175 <key>YERRL</key> | |
4176 <val>[]</val> | |
4177 <type>double</type> | |
4178 </param> | |
4179 <param> | |
4180 <key>XLABEL</key> | |
4181 <val>Sample</val> | |
4182 <type>char</type> | |
4183 </param> | |
4184 <param> | |
4185 <key>YLABEL</key> | |
4186 <val>Value</val> | |
4187 <type>char</type> | |
4188 </param> | |
4189 </plist> | |
4190 <plist name="none"> | |
4191 <param> | |
4192 <key>COLORS</key> | |
4193 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
4194 <type>cell</type> | |
4195 </param> | |
4196 <param> | |
4197 <key>ARRANGEMENT</key> | |
4198 <val>stacked</val> | |
4199 <type>char</type> | |
4200 </param> | |
4201 <param> | |
4202 <key>FUNCTION</key> | |
4203 <val>plot</val> | |
4204 <type>char</type> | |
4205 </param> | |
4206 <param> | |
4207 <key>LEGENDLOCATION</key> | |
4208 <val>NorthEast</val> | |
4209 <type>char</type> | |
4210 </param> | |
4211 <param> | |
4212 <key>XERRL</key> | |
4213 <val>[]</val> | |
4214 <type>double</type> | |
4215 </param> | |
4216 <param> | |
4217 <key>XERRU</key> | |
4218 <val>[]</val> | |
4219 <type>double</type> | |
4220 </param> | |
4221 <param> | |
4222 <key>YERRU</key> | |
4223 <val>[]</val> | |
4224 <type>double</type> | |
4225 </param> | |
4226 <param> | |
4227 <key>YERRL</key> | |
4228 <val>[]</val> | |
4229 <type>double</type> | |
4230 </param> | |
4231 <param> | |
4232 <key>XLABEL</key> | |
4233 <val>X-data</val> | |
4234 <type>char</type> | |
4235 </param> | |
4236 <param> | |
4237 <key>YLABEL</key> | |
4238 <val>Y-data</val> | |
4239 <type>char</type> | |
4240 </param> | |
4241 <param> | |
4242 <key>YMATHS</key> | |
4243 <val/> | |
4244 <type>char</type> | |
4245 </param> | |
4246 <param> | |
4247 <key>XMATHS</key> | |
4248 <val/> | |
4249 <type>char</type> | |
4250 </param> | |
4251 </plist> | |
4252 <plist name="none"> | |
4253 <param> | |
4254 <key>COLORS</key> | |
4255 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
4256 <type>cell</type> | |
4257 </param> | |
4258 <param> | |
4259 <key>ARRANGEMENT</key> | |
4260 <val>single</val> | |
4261 <type>char</type> | |
4262 </param> | |
4263 <param> | |
4264 <key>XLABEL</key> | |
4265 <val>Time</val> | |
4266 <type>char</type> | |
4267 </param> | |
4268 <param> | |
4269 <key>YLABEL</key> | |
4270 <val>Frequency</val> | |
4271 <type>char</type> | |
4272 </param> | |
4273 <param> | |
4274 <key>ZLABEL</key> | |
4275 <val>Amplitude</val> | |
4276 <type>char</type> | |
4277 </param> | |
4278 <param> | |
4279 <key>YMATHS</key> | |
4280 <val/> | |
4281 <type>char</type> | |
4282 </param> | |
4283 <param> | |
4284 <key>ZMATHS</key> | |
4285 <val/> | |
4286 <type>char</type> | |
4287 </param> | |
4288 <param> | |
4289 <key>XMATHS</key> | |
4290 <val/> | |
4291 <type>char</type> | |
4292 </param> | |
4293 </plist> | |
4294 </plists> | |
4295 </LTPDAalgorithm> | |
4296 <plist name="none"/> | |
4297 <port number="0" terminal="" type="output"/> | |
4298 </block> | |
4299 </document> | |
4300 <document name="Test Cohere" parentDiag="" visible="true" windowHeight="624" windowState="maximized" windowWidth="718" windowX="0" windowY="0" zoomFactor="1.21"> | |
4301 <block bounds="28 153 58 66" inputs="1" name="a1" outputs="1"> | |
4302 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
4303 <HelpText> AO analysis object class constructor. | |
4304 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
4305 | |
4306 DESCRIPTION: AO analysis object class constructor. | |
4307 Create an analysis object. | |
4308 | |
4309 Possible constructors: | |
4310 | |
4311 a = ao() - creates an empty analysis object | |
4312 a = ao('a1.xml') - creates a new analysis object by loading the | |
4313 analysis object from disk. | |
4314 a = ao('a1.mat') - creates a new analysis object by loading the | |
4315 analysis object from disk. | |
4316 a = ao('a1.mat') - creates a new analysis object by loading the | |
4317 2-column data set stored in the .MAT file. | |
4318 a = ao('file.txt') - creates a new analysis object by loading the | |
4319 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
4320 to be an equally sampled two-column file of | |
4321 time and amplitude. By default, the amplitude | |
4322 units are taken to be Volts ('V') and the | |
4323 time samples are assumed to be in seconds. | |
4324 a = ao('file',pl) - creates a new analysis object by loading the | |
4325 data in 'file'. The parameter list decide how the | |
4326 analysis object is created. The valid key values | |
4327 of the parameter list are: | |
4328 'type' 'tsdata','fsdata','xydata' | |
4329 [default: 'tsdata'] | |
4330 'use_fs' if this value is set, the | |
4331 x-axes is computed by the fs value. | |
4332 [default: empty array] | |
4333 'columns' [1 2 1 4] | |
4334 Each pair represented the x- and y-axes. | |
4335 (Each column pair creates an analysis object) | |
4336 Is the value 'use_fs' is used then | |
4337 represent each column the y-axes. | |
4338 (Each column creates an analysis object) | |
4339 [default: [1 2] ] | |
4340 'comment_char' The comment character in the file | |
4341 [default: ''] | |
4342 'description' To set the description in the analysis object | |
4343 '...' every property where exist a public | |
4344 set-function in the AO class e.g. | |
4345 setName, setT0, setYunits, ... | |
4346 If the constructor creates multiple ao's it is | |
4347 possible to give each data class its own e.g. | |
4348 'name'. In this case the parameter list with the | |
4349 key 'name' must have cell of the different values | |
4350 as the name of the different data objects. e.g. | |
4351 pl = plist('columns', [1 2 1 3], ... | |
4352 'name', {'name1' 'name2'}, ... | |
4353 'xunits', unit('s'), ... | |
4354 'yunits', {unit('V') unit('Hz'})); | |
4355 This parameter list creates two ao's with tsdata. | |
4356 | |
4357 'Robust' - set this to 'yes' to use (slow) | |
4358 robust data reading. Useful for | |
4359 complicated file formats. | |
4360 [default: 'yes'] | |
4361 | |
4362 NOTE: Data files with comments at the end of the lines can only be | |
4363 read if there are no lines with only comments. In this case, do not | |
4364 specify a comment character. If you really want to load a file like | |
4365 this, specify the 'Robust' option; this will be very slow for large | |
4366 files. | |
4367 | |
4368 a = ao(data) - creates an analysis object with a data | |
4369 object. Data object can be one of tsdata, | |
4370 fsdata, cdata, xydata, xyzdata. | |
4371 a = ao(data, hist) - creates an analysis object with a data | |
4372 object and a history object | |
4373 a = ao(specwin) - creates an analysis object from a specwin | |
4374 object | |
4375 a = ao(plist) - creates an analysis object from the description | |
4376 given in the parameter list | |
4377 | |
4378 Parameter sets for plist constructor (in order of priority): | |
4379 | |
4380 From XML File | |
4381 ------------- | |
4382 | |
4383 Construct an AO by loading it from an XML file. | |
4384 | |
4385 'filename' - construct an AO from a filename. | |
4386 Example: plist('filename', 'a1.xml') | |
4387 [default: empty string] | |
4388 | |
4389 From MAT File | |
4390 ------------- | |
4391 | |
4392 Construct an AO by loading it from a MAT file. | |
4393 | |
4394 'filename' - construct an AO from a filename. | |
4395 Example: plist('filename', 'a1.mat') | |
4396 [default: empty string] | |
4397 | |
4398 From ASCII File | |
4399 --------------- | |
4400 | |
4401 Construct an AO by loading it from an ASCII text file. | |
4402 | |
4403 'filename' - construct an AO from a filename. | |
4404 Example: plist('filename', 'a1.txt') | |
4405 [default: empty string] | |
4406 | |
4407 For additional parameters, see constructor ao(file, pl) above. | |
4408 | |
4409 From Function | |
4410 ------------- | |
4411 | |
4412 Construct an AO from the description of any valid MATLAB function. | |
4413 | |
4414 'fcn' - any valid MATLAB function. | |
4415 Example: plist('fcn', 'randn(100,1)') | |
4416 | |
4417 You can pass additional parameters to the fcn as extra | |
4418 parameters in the parameter list: | |
4419 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
4420 | |
4421 ** Note: case is ignored in the function specification | |
4422 such the following: | |
4423 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
4424 results in: | |
4425 2*2*[1:20] | |
4426 | |
4427 [default: 'randn(100,1)'] | |
4428 | |
4429 From Values | |
4430 ----------- | |
4431 | |
4432 Construct an AO from a set of values. | |
4433 | |
4434 'vals' - a set of values. | |
4435 Example: plist('vals', [1 2 3]) | |
4436 optional parameter: repeat 'N' times | |
4437 Example: plist('vals', [1 2 3], 'N', 10) | |
4438 | |
4439 [default: vals: [1], N: [1] ] | |
4440 OR | |
4441 | |
4442 To produce a tsdata AO | |
4443 | |
4444 'xvals' - a set of x values. | |
4445 'yvals' - a set of y values. | |
4446 | |
4447 | |
4448 | |
4449 From Time-series Function | |
4450 ------------------------- | |
4451 | |
4452 Construct an AO from a function of time, t. | |
4453 | |
4454 'tsfcn' - a function of time. | |
4455 | |
4456 You can also specify optional parameters | |
4457 'fs' - sampling frequency [default: 10 Hz] | |
4458 'nsecs' - length in seconds [default: 10 s] | |
4459 | |
4460 You can also specify the initial time (t0) associated with | |
4461 the time-series by passing a parameter 't0' with a value | |
4462 that is a time object [default: time(0)] | |
4463 Example: | |
4464 plist('fs', 10, 'nsecs', 10, ... | |
4465 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
4466 't0', time('1980-12-01 12:43:12')); | |
4467 | |
4468 From Frequency-series Function | |
4469 ------------------------------ | |
4470 | |
4471 Construct an AO from a function of frequency, f. | |
4472 | |
4473 'fsfcn' - a function of frequency, f. [default: 'f'] | |
4474 | |
4475 You can also specify optional parameters: | |
4476 'f1' - the initial frequency [default: 1e-9] | |
4477 'f2' - the final frequency [default: 5] | |
4478 'nf' - the number of frequency samples [default: 1000] | |
4479 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
4480 or provide a frequency vector: | |
4481 'f' - a vector of frequencies on which to evaluate the | |
4482 function [default: [] ] | |
4483 | |
4484 From Window | |
4485 ----------- | |
4486 | |
4487 Construct an AO from a spectral window object. | |
4488 | |
4489 'win' - A specwin object. | |
4490 | |
4491 This creates a cdata type AO containing the window values. | |
4492 Example: plist('win', specwin('Hannning', 100)) | |
4493 | |
4494 [default: specwin('Hanning', 100)] | |
4495 | |
4496 From Waveform | |
4497 ------------- | |
4498 | |
4499 Construct an AO from a waveform description. | |
4500 | |
4501 'waveform' - a waveform description (see options below). | |
4502 | |
4503 You can also specify additional parameters: | |
4504 'fs' - sampling frequency [default: 10 Hz] | |
4505 'nsecs' - length in seconds [default: 10 s] | |
4506 't0' - time-stamp of the first data sample [default time(0)] | |
4507 | |
4508 and, for the following waveform types: | |
4509 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
4510 (can be vectors for sum of sine waves) | |
4511 'A' - Amplitude of the wave | |
4512 'f' - Frequency of the wave | |
4513 'phi' - Phase of the eave | |
4514 'nsecs' - Number of seconds (in seconds) | |
4515 'toff' - Offset of the wave (in seconds) | |
4516 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
4517 'sigma' specify the standard deviation | |
4518 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
4519 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
4520 'Square wave' - 'f', 'duty' (help square) | |
4521 'Sawtooth' - 'f', 'width' (help sawtooth) | |
4522 | |
4523 You can also specify the initial time (t0) associated with | |
4524 the time-series by passing a parameter 't0' with a value | |
4525 that is a time object. | |
4526 | |
4527 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
4528 fs: 10, nsecs: 10, t0: time(0) ] | |
4529 | |
4530 | |
4531 From Repository | |
4532 --------------- | |
4533 | |
4534 Construct an AO by retrieving it from an LTPDA repository. | |
4535 | |
4536 'Hostname' - the repository hostname. Only those objects which | |
4537 are AOs are returned. | |
4538 [default: 'localhost']; | |
4539 | |
4540 Additional parameters: | |
4541 | |
4542 'Database' - The database name [default: 'ltpda'] | |
4543 'ID' - A vector of object IDs. [default: []] | |
4544 'CID' - Retrieve all AO objects from a particular | |
4545 collection. | |
4546 'Binary' - Set to 'yes' to retrieve from stored binary | |
4547 representation (not always available). | |
4548 | |
4549 From Polynomial | |
4550 --------------- | |
4551 | |
4552 Construct an AO from a set of polynomial coefficients. | |
4553 | |
4554 'polyval' - a set of polynomial coefficients. | |
4555 [default: [-0.0001 0.02 -1 -1] ] | |
4556 | |
4557 Additional parameters: | |
4558 'Nsecs' and 'fs' - number of seconds, and sample rate | |
4559 [defaults: nsecs: 10, fs: 10] | |
4560 or 't' - vector of time vertices | |
4561 [default: [] ] | |
4562 | |
4563 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
4564 | |
4565 | |
4566 From Pzmodel | |
4567 ------------ | |
4568 | |
4569 Generates an ao with a timeseries with a prescribed spectrum. | |
4570 p = [pz(f1,q1) pz(f2,q2)] | |
4571 z = [pz(f3,q3)] | |
4572 pzm = pzmodel(gain, p, z) | |
4573 The constructor also needs: fs - sampling frequency | |
4574 nsecs - number of seconds to be generated | |
4575 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
4576 | |
4577 From Model | |
4578 ---------- | |
4579 | |
4580 A collection of built-in models which construct data series and return | |
4581 them in AOs. | |
4582 | |
4583 'Model' - give the model name. To get a list of models: | |
4584 ao(plist('Model', '')) | |
4585 | |
4586 Each model has additional parameters that need to be passed. To see the | |
4587 parameters: | |
4588 >> help ao.<model_name> | |
4589 | |
4590 for example, | |
4591 | |
4592 >> help ao.mdc1_fd_dynamics | |
4593 | |
4594 From Plist | |
4595 ---------- | |
4596 | |
4597 'Plist' - construct from a plist. The value passed should be a plist | |
4598 object. | |
4599 [default: empty plist] | |
4600 | |
4601 | |
4602 | |
4603 Examples: | |
4604 | |
4605 1) Normally distributed random noise time-series | |
4606 | |
4607 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
4608 rd10 = ao(p); | |
4609 | |
4610 | |
4611 Indexing: | |
4612 b = a(1) % where a is an array of analysis objects | |
4613 d = a.data; % get the data object | |
4614 h = a.hist; % get the history object | |
4615 d = a.data.x(1:20); % get a matrix of data values x; | |
4616 | |
4617 2) Timeseries with a prescribed spectrum | |
4618 | |
4619 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
4620 a = ao(p) | |
4621 | |
4622 fs - sampling frequency | |
4623 nsecs - number of seconds in time series | |
4624 ndigits - number of digits for symbolic math toolbox (default: 32) | |
4625 | |
4626 | |
4627 From pzmodel | |
4628 ------------ | |
4629 | |
4630 Generates an ao with a timeseries with a prescribed spectrum. | |
4631 p = [pz(f1,q1) pz(f2,q2)] | |
4632 z = [pz(f3,q3)] | |
4633 pzm = pzmodel(gain, p, z) | |
4634 The constructor also needs: fs - sampling frequency | |
4635 nsecs - number of seconds to be generated | |
4636 a = ao(pzm, nsecs, fs) | |
4637 | |
4638 The following call returns an minfo object that contains information | |
4639 about the AO constructor: | |
4640 | |
4641 >> info = ao.getInfo | |
4642 | |
4643 You can get information about class methods by calling: | |
4644 | |
4645 >> info = ao.getInfo(method) | |
4646 | |
4647 e.g. info = ao.getInfo('psd') | |
4648 | |
4649 You can also restrict the sets of parameters contained in the minfo | |
4650 object by calling: | |
4651 | |
4652 >> info = ao.getInfo(method, set) | |
4653 | |
4654 e.g., info = ao.getInfo('ao', 'From Vals') | |
4655 | |
4656 See also tsdata, fsdata, xydata, cdata, xyzdata | |
4657 | |
4658 M Hewitson 30-01-07 | |
4659 | |
4660 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
4661 </HelpText> | |
4662 <sets> | |
4663 <set name="Default"/> | |
4664 <set name="From XML File"/> | |
4665 <set name="From MAT File"/> | |
4666 <set name="From ASCII File"/> | |
4667 <set name="From Function"/> | |
4668 <set name="From Values"/> | |
4669 <set name="From Time-series Function"/> | |
4670 <set name="From Frequency-series Function"/> | |
4671 <set name="From Window"/> | |
4672 <set name="From Waveform"/> | |
4673 <set name="From Polynomial"/> | |
4674 <set name="From Repository"/> | |
4675 <set name="From Plist"/> | |
4676 <set name="From Pzmodel"/> | |
4677 <set name="From Model"/> | |
4678 </sets> | |
4679 <plists> | |
4680 <plist name="none"/> | |
4681 <plist name="none"> | |
4682 <param> | |
4683 <key>FILENAME</key> | |
4684 <val/> | |
4685 <type>char</type> | |
4686 </param> | |
4687 </plist> | |
4688 <plist name="none"> | |
4689 <param> | |
4690 <key>FILENAME</key> | |
4691 <val/> | |
4692 <type>char</type> | |
4693 </param> | |
4694 </plist> | |
4695 <plist name="none"> | |
4696 <param> | |
4697 <key>FILENAME</key> | |
4698 <val/> | |
4699 <type>char</type> | |
4700 </param> | |
4701 <param> | |
4702 <key>TYPE</key> | |
4703 <val>tsdata</val> | |
4704 <type>char</type> | |
4705 </param> | |
4706 <param> | |
4707 <key>COLUMNS</key> | |
4708 <val>[1 2]</val> | |
4709 <type>double</type> | |
4710 </param> | |
4711 <param> | |
4712 <key>XUNITS</key> | |
4713 <val>[ unit(' s ') ]</val> | |
4714 <type>unit</type> | |
4715 </param> | |
4716 <param> | |
4717 <key>YUNITS</key> | |
4718 <val>[ unit(' ') ]</val> | |
4719 <type>unit</type> | |
4720 </param> | |
4721 <param> | |
4722 <key>T0</key> | |
4723 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
4724 <type>time</type> | |
4725 </param> | |
4726 <param> | |
4727 <key>COMMENT_CHAR</key> | |
4728 <val/> | |
4729 <type>char</type> | |
4730 </param> | |
4731 <param> | |
4732 <key>USE_FS</key> | |
4733 <val/> | |
4734 <type>char</type> | |
4735 </param> | |
4736 <param> | |
4737 <key>ROBUST</key> | |
4738 <val>yes</val> | |
4739 <type>char</type> | |
4740 </param> | |
4741 </plist> | |
4742 <plist name="none"> | |
4743 <param> | |
4744 <key>FCN</key> | |
4745 <val>randn(100,1)</val> | |
4746 <type>char</type> | |
4747 </param> | |
4748 <param> | |
4749 <key>YUNITS</key> | |
4750 <val>[ unit(' ') ]</val> | |
4751 <type>unit</type> | |
4752 </param> | |
4753 </plist> | |
4754 <plist name="none"> | |
4755 <param> | |
4756 <key>VALS</key> | |
4757 <val>[]</val> | |
4758 <type>double</type> | |
4759 </param> | |
4760 <param> | |
4761 <key>N</key> | |
4762 <val>1</val> | |
4763 <type>double</type> | |
4764 </param> | |
4765 <param> | |
4766 <key>DTYPE</key> | |
4767 <val/> | |
4768 <type>char</type> | |
4769 </param> | |
4770 <param> | |
4771 <key>FS</key> | |
4772 <val>[]</val> | |
4773 <type>double</type> | |
4774 </param> | |
4775 <param> | |
4776 <key>XVALS</key> | |
4777 <val>[]</val> | |
4778 <type>double</type> | |
4779 </param> | |
4780 <param> | |
4781 <key>YVALS</key> | |
4782 <val>[]</val> | |
4783 <type>double</type> | |
4784 </param> | |
4785 <param> | |
4786 <key>YUNITS</key> | |
4787 <val/> | |
4788 <type>char</type> | |
4789 </param> | |
4790 </plist> | |
4791 <plist name="none"> | |
4792 <param> | |
4793 <key>TSFCN</key> | |
4794 <val>sin(2*pi*7.433*t) + randn(size(t))</val> | |
4795 <type>char</type> | |
4796 </param> | |
4797 <param> | |
4798 <key>FS</key> | |
4799 <val>1000</val> | |
4800 <type>double</type> | |
4801 </param> | |
4802 <param> | |
4803 <key>NSECS</key> | |
4804 <val>10</val> | |
4805 <type>double</type> | |
4806 </param> | |
4807 <param> | |
4808 <key>T0</key> | |
4809 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
4810 <type>time</type> | |
4811 </param> | |
4812 <param> | |
4813 <key>XUNITS</key> | |
4814 <val>[ unit(' s ') ]</val> | |
4815 <type>unit</type> | |
4816 </param> | |
4817 <param> | |
4818 <key>YUNITS</key> | |
4819 <val>[ unit(' ') ]</val> | |
4820 <type>unit</type> | |
4821 </param> | |
4822 </plist> | |
4823 <plist name="none"> | |
4824 <param> | |
4825 <key>FSFCN</key> | |
4826 <val>f</val> | |
4827 <type>char</type> | |
4828 </param> | |
4829 <param> | |
4830 <key>F1</key> | |
4831 <val>1e-09</val> | |
4832 <type>double</type> | |
4833 </param> | |
4834 <param> | |
4835 <key>F2</key> | |
4836 <val>5</val> | |
4837 <type>double</type> | |
4838 </param> | |
4839 <param> | |
4840 <key>NF</key> | |
4841 <val>1000</val> | |
4842 <type>double</type> | |
4843 </param> | |
4844 <param> | |
4845 <key>SCALE</key> | |
4846 <val>log</val> | |
4847 <type>char</type> | |
4848 </param> | |
4849 <param> | |
4850 <key>F</key> | |
4851 <val>[]</val> | |
4852 <type>double</type> | |
4853 </param> | |
4854 <param> | |
4855 <key>XUNITS</key> | |
4856 <val>[ unit(' Hz ') ]</val> | |
4857 <type>unit</type> | |
4858 </param> | |
4859 <param> | |
4860 <key>YUNITS</key> | |
4861 <val>[ unit(' ') ]</val> | |
4862 <type>unit</type> | |
4863 </param> | |
4864 </plist> | |
4865 <plist name="none"> | |
4866 <param> | |
4867 <key>WIN</key> | |
4868 <val> specwin('Hanning', 100)</val> | |
4869 <type>specwin</type> | |
4870 </param> | |
4871 <param> | |
4872 <key>YUNITS</key> | |
4873 <val>[ unit(' ') ]</val> | |
4874 <type>unit</type> | |
4875 </param> | |
4876 </plist> | |
4877 <plist name="none"> | |
4878 <param> | |
4879 <key>WAVEFORM</key> | |
4880 <val>sine wave</val> | |
4881 <type>char</type> | |
4882 </param> | |
4883 <param> | |
4884 <key>A</key> | |
4885 <val>1</val> | |
4886 <type>double</type> | |
4887 </param> | |
4888 <param> | |
4889 <key>F</key> | |
4890 <val>1.23</val> | |
4891 <type>double</type> | |
4892 </param> | |
4893 <param> | |
4894 <key>PHI</key> | |
4895 <val>0</val> | |
4896 <type>double</type> | |
4897 </param> | |
4898 <param> | |
4899 <key>FS</key> | |
4900 <val>10</val> | |
4901 <type>double</type> | |
4902 </param> | |
4903 <param> | |
4904 <key>NSECS</key> | |
4905 <val>10</val> | |
4906 <type>double</type> | |
4907 </param> | |
4908 <param> | |
4909 <key>T0</key> | |
4910 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
4911 <type>time</type> | |
4912 </param> | |
4913 <param> | |
4914 <key>TOFF</key> | |
4915 <val>0</val> | |
4916 <type>double</type> | |
4917 </param> | |
4918 <param> | |
4919 <key>XUNITS</key> | |
4920 <val>[ unit(' s ') ]</val> | |
4921 <type>unit</type> | |
4922 </param> | |
4923 <param> | |
4924 <key>YUNITS</key> | |
4925 <val>[ unit(' ') ]</val> | |
4926 <type>unit</type> | |
4927 </param> | |
4928 </plist> | |
4929 <plist name="none"> | |
4930 <param> | |
4931 <key>POLYVAL</key> | |
4932 <val>[-0.0001 0.02 -1 -1]</val> | |
4933 <type>double</type> | |
4934 </param> | |
4935 <param> | |
4936 <key>NSECS</key> | |
4937 <val>10</val> | |
4938 <type>double</type> | |
4939 </param> | |
4940 <param> | |
4941 <key>FS</key> | |
4942 <val>10</val> | |
4943 <type>double</type> | |
4944 </param> | |
4945 <param> | |
4946 <key>T</key> | |
4947 <val>[]</val> | |
4948 <type>double</type> | |
4949 </param> | |
4950 <param> | |
4951 <key>XUNITS</key> | |
4952 <val>[ unit(' s ') ]</val> | |
4953 <type>unit</type> | |
4954 </param> | |
4955 <param> | |
4956 <key>YUNITS</key> | |
4957 <val>[ unit(' ') ]</val> | |
4958 <type>unit</type> | |
4959 </param> | |
4960 </plist> | |
4961 <plist name="none"> | |
4962 <param> | |
4963 <key>HOSTNAME</key> | |
4964 <val>localhost</val> | |
4965 <type>char</type> | |
4966 </param> | |
4967 <param> | |
4968 <key>DATABASE</key> | |
4969 <val>ltpda</val> | |
4970 <type>char</type> | |
4971 </param> | |
4972 <param> | |
4973 <key>ID</key> | |
4974 <val>[]</val> | |
4975 <type>double</type> | |
4976 </param> | |
4977 <param> | |
4978 <key>BINARY</key> | |
4979 <val>no</val> | |
4980 <type>char</type> | |
4981 </param> | |
4982 </plist> | |
4983 <plist name="none"> | |
4984 <param> | |
4985 <key>PLIST</key> | |
4986 <val>(empty-plist)</val> | |
4987 <type>plist</type> | |
4988 </param> | |
4989 </plist> | |
4990 <plist name="none"> | |
4991 <param> | |
4992 <key>PZMODEL</key> | |
4993 <val>pzmodel(none)</val> | |
4994 <type>pzmodel</type> | |
4995 </param> | |
4996 <param> | |
4997 <key>NSECS</key> | |
4998 <val>0</val> | |
4999 <type>double</type> | |
5000 </param> | |
5001 <param> | |
5002 <key>FS</key> | |
5003 <val>0</val> | |
5004 <type>double</type> | |
5005 </param> | |
5006 <param> | |
5007 <key>XUNITS</key> | |
5008 <val>[ unit(' s ') ]</val> | |
5009 <type>unit</type> | |
5010 </param> | |
5011 <param> | |
5012 <key>YUNITS</key> | |
5013 <val>[ unit(' ') ]</val> | |
5014 <type>unit</type> | |
5015 </param> | |
5016 </plist> | |
5017 <plist name="none"> | |
5018 <param> | |
5019 <key>MODEL</key> | |
5020 <val/> | |
5021 <type>char</type> | |
5022 </param> | |
5023 </plist> | |
5024 </plists> | |
5025 </LTPDAalgorithm> | |
5026 <plist name="none"> | |
5027 <param> | |
5028 <key>TSFCN</key> | |
5029 <val>sin(2*pi*7.433*t) + randn(size(t))</val> | |
5030 <type>char</type> | |
5031 </param> | |
5032 <param> | |
5033 <key>FS</key> | |
5034 <val>1000</val> | |
5035 <type>double</type> | |
5036 </param> | |
5037 <param> | |
5038 <key>NSECS</key> | |
5039 <val>10</val> | |
5040 <type>double</type> | |
5041 </param> | |
5042 <param> | |
5043 <key>T0</key> | |
5044 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
5045 <type>time</type> | |
5046 </param> | |
5047 <param> | |
5048 <key>XUNITS</key> | |
5049 <val>[ unit(' s ') ]</val> | |
5050 <type>unit</type> | |
5051 </param> | |
5052 <param> | |
5053 <key>YUNITS</key> | |
5054 <val>[ unit(' ') ]</val> | |
5055 <type>unit</type> | |
5056 </param> | |
5057 </plist> | |
5058 <port number="0" terminal="" type="output"> | |
5059 <node> | |
5060 <pipe color="-3657166" dstblock="a3" dstport="0" srcblock="a1" thickness="2.5"/> | |
5061 <pipe color="-3657166" dstblock="a8" dstport="1" srcblock="a1" thickness="2.5"/> | |
5062 </node> | |
5063 </port> | |
5064 </block> | |
5065 <block bounds="36 76 54 49" inputs="1" name="a2" outputs="1"> | |
5066 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
5067 <HelpText> AO analysis object class constructor. | |
5068 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
5069 | |
5070 DESCRIPTION: AO analysis object class constructor. | |
5071 Create an analysis object. | |
5072 | |
5073 Possible constructors: | |
5074 | |
5075 a = ao() - creates an empty analysis object | |
5076 a = ao('a1.xml') - creates a new analysis object by loading the | |
5077 analysis object from disk. | |
5078 a = ao('a1.mat') - creates a new analysis object by loading the | |
5079 analysis object from disk. | |
5080 a = ao('a1.mat') - creates a new analysis object by loading the | |
5081 2-column data set stored in the .MAT file. | |
5082 a = ao('file.txt') - creates a new analysis object by loading the | |
5083 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
5084 to be an equally sampled two-column file of | |
5085 time and amplitude. By default, the amplitude | |
5086 units are taken to be Volts ('V') and the | |
5087 time samples are assumed to be in seconds. | |
5088 a = ao('file',pl) - creates a new analysis object by loading the | |
5089 data in 'file'. The parameter list decide how the | |
5090 analysis object is created. The valid key values | |
5091 of the parameter list are: | |
5092 'type' 'tsdata','fsdata','xydata' | |
5093 [default: 'tsdata'] | |
5094 'use_fs' if this value is set, the | |
5095 x-axes is computed by the fs value. | |
5096 [default: empty array] | |
5097 'columns' [1 2 1 4] | |
5098 Each pair represented the x- and y-axes. | |
5099 (Each column pair creates an analysis object) | |
5100 Is the value 'use_fs' is used then | |
5101 represent each column the y-axes. | |
5102 (Each column creates an analysis object) | |
5103 [default: [1 2] ] | |
5104 'comment_char' The comment character in the file | |
5105 [default: ''] | |
5106 'description' To set the description in the analysis object | |
5107 '...' every property where exist a public | |
5108 set-function in the AO class e.g. | |
5109 setName, setT0, setYunits, ... | |
5110 If the constructor creates multiple ao's it is | |
5111 possible to give each data class its own e.g. | |
5112 'name'. In this case the parameter list with the | |
5113 key 'name' must have cell of the different values | |
5114 as the name of the different data objects. e.g. | |
5115 pl = plist('columns', [1 2 1 3], ... | |
5116 'name', {'name1' 'name2'}, ... | |
5117 'xunits', unit('s'), ... | |
5118 'yunits', {unit('V') unit('Hz'})); | |
5119 This parameter list creates two ao's with tsdata. | |
5120 | |
5121 'Robust' - set this to 'yes' to use (slow) | |
5122 robust data reading. Useful for | |
5123 complicated file formats. | |
5124 [default: 'yes'] | |
5125 | |
5126 NOTE: Data files with comments at the end of the lines can only be | |
5127 read if there are no lines with only comments. In this case, do not | |
5128 specify a comment character. If you really want to load a file like | |
5129 this, specify the 'Robust' option; this will be very slow for large | |
5130 files. | |
5131 | |
5132 a = ao(data) - creates an analysis object with a data | |
5133 object. Data object can be one of tsdata, | |
5134 fsdata, cdata, xydata, xyzdata. | |
5135 a = ao(data, hist) - creates an analysis object with a data | |
5136 object and a history object | |
5137 a = ao(specwin) - creates an analysis object from a specwin | |
5138 object | |
5139 a = ao(plist) - creates an analysis object from the description | |
5140 given in the parameter list | |
5141 | |
5142 Parameter sets for plist constructor (in order of priority): | |
5143 | |
5144 From XML File | |
5145 ------------- | |
5146 | |
5147 Construct an AO by loading it from an XML file. | |
5148 | |
5149 'filename' - construct an AO from a filename. | |
5150 Example: plist('filename', 'a1.xml') | |
5151 [default: empty string] | |
5152 | |
5153 From MAT File | |
5154 ------------- | |
5155 | |
5156 Construct an AO by loading it from a MAT file. | |
5157 | |
5158 'filename' - construct an AO from a filename. | |
5159 Example: plist('filename', 'a1.mat') | |
5160 [default: empty string] | |
5161 | |
5162 From ASCII File | |
5163 --------------- | |
5164 | |
5165 Construct an AO by loading it from an ASCII text file. | |
5166 | |
5167 'filename' - construct an AO from a filename. | |
5168 Example: plist('filename', 'a1.txt') | |
5169 [default: empty string] | |
5170 | |
5171 For additional parameters, see constructor ao(file, pl) above. | |
5172 | |
5173 From Function | |
5174 ------------- | |
5175 | |
5176 Construct an AO from the description of any valid MATLAB function. | |
5177 | |
5178 'fcn' - any valid MATLAB function. | |
5179 Example: plist('fcn', 'randn(100,1)') | |
5180 | |
5181 You can pass additional parameters to the fcn as extra | |
5182 parameters in the parameter list: | |
5183 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
5184 | |
5185 ** Note: case is ignored in the function specification | |
5186 such the following: | |
5187 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
5188 results in: | |
5189 2*2*[1:20] | |
5190 | |
5191 [default: 'randn(100,1)'] | |
5192 | |
5193 From Values | |
5194 ----------- | |
5195 | |
5196 Construct an AO from a set of values. | |
5197 | |
5198 'vals' - a set of values. | |
5199 Example: plist('vals', [1 2 3]) | |
5200 optional parameter: repeat 'N' times | |
5201 Example: plist('vals', [1 2 3], 'N', 10) | |
5202 | |
5203 [default: vals: [1], N: [1] ] | |
5204 OR | |
5205 | |
5206 To produce a tsdata AO | |
5207 | |
5208 'xvals' - a set of x values. | |
5209 'yvals' - a set of y values. | |
5210 | |
5211 | |
5212 | |
5213 From Time-series Function | |
5214 ------------------------- | |
5215 | |
5216 Construct an AO from a function of time, t. | |
5217 | |
5218 'tsfcn' - a function of time. | |
5219 | |
5220 You can also specify optional parameters | |
5221 'fs' - sampling frequency [default: 10 Hz] | |
5222 'nsecs' - length in seconds [default: 10 s] | |
5223 | |
5224 You can also specify the initial time (t0) associated with | |
5225 the time-series by passing a parameter 't0' with a value | |
5226 that is a time object [default: time(0)] | |
5227 Example: | |
5228 plist('fs', 10, 'nsecs', 10, ... | |
5229 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
5230 't0', time('1980-12-01 12:43:12')); | |
5231 | |
5232 From Frequency-series Function | |
5233 ------------------------------ | |
5234 | |
5235 Construct an AO from a function of frequency, f. | |
5236 | |
5237 'fsfcn' - a function of frequency, f. [default: 'f'] | |
5238 | |
5239 You can also specify optional parameters: | |
5240 'f1' - the initial frequency [default: 1e-9] | |
5241 'f2' - the final frequency [default: 5] | |
5242 'nf' - the number of frequency samples [default: 1000] | |
5243 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
5244 or provide a frequency vector: | |
5245 'f' - a vector of frequencies on which to evaluate the | |
5246 function [default: [] ] | |
5247 | |
5248 From Window | |
5249 ----------- | |
5250 | |
5251 Construct an AO from a spectral window object. | |
5252 | |
5253 'win' - A specwin object. | |
5254 | |
5255 This creates a cdata type AO containing the window values. | |
5256 Example: plist('win', specwin('Hannning', 100)) | |
5257 | |
5258 [default: specwin('Hanning', 100)] | |
5259 | |
5260 From Waveform | |
5261 ------------- | |
5262 | |
5263 Construct an AO from a waveform description. | |
5264 | |
5265 'waveform' - a waveform description (see options below). | |
5266 | |
5267 You can also specify additional parameters: | |
5268 'fs' - sampling frequency [default: 10 Hz] | |
5269 'nsecs' - length in seconds [default: 10 s] | |
5270 't0' - time-stamp of the first data sample [default time(0)] | |
5271 | |
5272 and, for the following waveform types: | |
5273 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
5274 (can be vectors for sum of sine waves) | |
5275 'A' - Amplitude of the wave | |
5276 'f' - Frequency of the wave | |
5277 'phi' - Phase of the eave | |
5278 'nsecs' - Number of seconds (in seconds) | |
5279 'toff' - Offset of the wave (in seconds) | |
5280 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
5281 'sigma' specify the standard deviation | |
5282 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
5283 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
5284 'Square wave' - 'f', 'duty' (help square) | |
5285 'Sawtooth' - 'f', 'width' (help sawtooth) | |
5286 | |
5287 You can also specify the initial time (t0) associated with | |
5288 the time-series by passing a parameter 't0' with a value | |
5289 that is a time object. | |
5290 | |
5291 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
5292 fs: 10, nsecs: 10, t0: time(0) ] | |
5293 | |
5294 | |
5295 From Repository | |
5296 --------------- | |
5297 | |
5298 Construct an AO by retrieving it from an LTPDA repository. | |
5299 | |
5300 'Hostname' - the repository hostname. Only those objects which | |
5301 are AOs are returned. | |
5302 [default: 'localhost']; | |
5303 | |
5304 Additional parameters: | |
5305 | |
5306 'Database' - The database name [default: 'ltpda'] | |
5307 'ID' - A vector of object IDs. [default: []] | |
5308 'CID' - Retrieve all AO objects from a particular | |
5309 collection. | |
5310 'Binary' - Set to 'yes' to retrieve from stored binary | |
5311 representation (not always available). | |
5312 | |
5313 From Polynomial | |
5314 --------------- | |
5315 | |
5316 Construct an AO from a set of polynomial coefficients. | |
5317 | |
5318 'polyval' - a set of polynomial coefficients. | |
5319 [default: [-0.0001 0.02 -1 -1] ] | |
5320 | |
5321 Additional parameters: | |
5322 'Nsecs' and 'fs' - number of seconds, and sample rate | |
5323 [defaults: nsecs: 10, fs: 10] | |
5324 or 't' - vector of time vertices | |
5325 [default: [] ] | |
5326 | |
5327 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
5328 | |
5329 | |
5330 From Pzmodel | |
5331 ------------ | |
5332 | |
5333 Generates an ao with a timeseries with a prescribed spectrum. | |
5334 p = [pz(f1,q1) pz(f2,q2)] | |
5335 z = [pz(f3,q3)] | |
5336 pzm = pzmodel(gain, p, z) | |
5337 The constructor also needs: fs - sampling frequency | |
5338 nsecs - number of seconds to be generated | |
5339 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
5340 | |
5341 From Model | |
5342 ---------- | |
5343 | |
5344 A collection of built-in models which construct data series and return | |
5345 them in AOs. | |
5346 | |
5347 'Model' - give the model name. To get a list of models: | |
5348 ao(plist('Model', '')) | |
5349 | |
5350 Each model has additional parameters that need to be passed. To see the | |
5351 parameters: | |
5352 >> help ao.<model_name> | |
5353 | |
5354 for example, | |
5355 | |
5356 >> help ao.mdc1_fd_dynamics | |
5357 | |
5358 From Plist | |
5359 ---------- | |
5360 | |
5361 'Plist' - construct from a plist. The value passed should be a plist | |
5362 object. | |
5363 [default: empty plist] | |
5364 | |
5365 | |
5366 | |
5367 Examples: | |
5368 | |
5369 1) Normally distributed random noise time-series | |
5370 | |
5371 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
5372 rd10 = ao(p); | |
5373 | |
5374 | |
5375 Indexing: | |
5376 b = a(1) % where a is an array of analysis objects | |
5377 d = a.data; % get the data object | |
5378 h = a.hist; % get the history object | |
5379 d = a.data.x(1:20); % get a matrix of data values x; | |
5380 | |
5381 2) Timeseries with a prescribed spectrum | |
5382 | |
5383 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
5384 a = ao(p) | |
5385 | |
5386 fs - sampling frequency | |
5387 nsecs - number of seconds in time series | |
5388 ndigits - number of digits for symbolic math toolbox (default: 32) | |
5389 | |
5390 | |
5391 From pzmodel | |
5392 ------------ | |
5393 | |
5394 Generates an ao with a timeseries with a prescribed spectrum. | |
5395 p = [pz(f1,q1) pz(f2,q2)] | |
5396 z = [pz(f3,q3)] | |
5397 pzm = pzmodel(gain, p, z) | |
5398 The constructor also needs: fs - sampling frequency | |
5399 nsecs - number of seconds to be generated | |
5400 a = ao(pzm, nsecs, fs) | |
5401 | |
5402 The following call returns an minfo object that contains information | |
5403 about the AO constructor: | |
5404 | |
5405 >> info = ao.getInfo | |
5406 | |
5407 You can get information about class methods by calling: | |
5408 | |
5409 >> info = ao.getInfo(method) | |
5410 | |
5411 e.g. info = ao.getInfo('psd') | |
5412 | |
5413 You can also restrict the sets of parameters contained in the minfo | |
5414 object by calling: | |
5415 | |
5416 >> info = ao.getInfo(method, set) | |
5417 | |
5418 e.g., info = ao.getInfo('ao', 'From Vals') | |
5419 | |
5420 See also tsdata, fsdata, xydata, cdata, xyzdata | |
5421 | |
5422 M Hewitson 30-01-07 | |
5423 | |
5424 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
5425 </HelpText> | |
5426 <sets> | |
5427 <set name="Default"/> | |
5428 <set name="From XML File"/> | |
5429 <set name="From MAT File"/> | |
5430 <set name="From ASCII File"/> | |
5431 <set name="From Function"/> | |
5432 <set name="From Values"/> | |
5433 <set name="From Time-series Function"/> | |
5434 <set name="From Frequency-series Function"/> | |
5435 <set name="From Window"/> | |
5436 <set name="From Waveform"/> | |
5437 <set name="From Polynomial"/> | |
5438 <set name="From Repository"/> | |
5439 <set name="From Plist"/> | |
5440 <set name="From Pzmodel"/> | |
5441 <set name="From Model"/> | |
5442 </sets> | |
5443 <plists> | |
5444 <plist name="none"/> | |
5445 <plist name="none"> | |
5446 <param> | |
5447 <key>FILENAME</key> | |
5448 <val/> | |
5449 <type>char</type> | |
5450 </param> | |
5451 </plist> | |
5452 <plist name="none"> | |
5453 <param> | |
5454 <key>FILENAME</key> | |
5455 <val/> | |
5456 <type>char</type> | |
5457 </param> | |
5458 </plist> | |
5459 <plist name="none"> | |
5460 <param> | |
5461 <key>FILENAME</key> | |
5462 <val/> | |
5463 <type>char</type> | |
5464 </param> | |
5465 <param> | |
5466 <key>TYPE</key> | |
5467 <val>tsdata</val> | |
5468 <type>char</type> | |
5469 </param> | |
5470 <param> | |
5471 <key>COLUMNS</key> | |
5472 <val>[1 2]</val> | |
5473 <type>double</type> | |
5474 </param> | |
5475 <param> | |
5476 <key>XUNITS</key> | |
5477 <val>[ unit(' s ') ]</val> | |
5478 <type>unit</type> | |
5479 </param> | |
5480 <param> | |
5481 <key>YUNITS</key> | |
5482 <val>[ unit(' ') ]</val> | |
5483 <type>unit</type> | |
5484 </param> | |
5485 <param> | |
5486 <key>T0</key> | |
5487 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
5488 <type>time</type> | |
5489 </param> | |
5490 <param> | |
5491 <key>COMMENT_CHAR</key> | |
5492 <val/> | |
5493 <type>char</type> | |
5494 </param> | |
5495 <param> | |
5496 <key>USE_FS</key> | |
5497 <val/> | |
5498 <type>char</type> | |
5499 </param> | |
5500 <param> | |
5501 <key>ROBUST</key> | |
5502 <val>yes</val> | |
5503 <type>char</type> | |
5504 </param> | |
5505 </plist> | |
5506 <plist name="none"> | |
5507 <param> | |
5508 <key>FCN</key> | |
5509 <val>randn(100,1)</val> | |
5510 <type>char</type> | |
5511 </param> | |
5512 <param> | |
5513 <key>YUNITS</key> | |
5514 <val>[ unit(' ') ]</val> | |
5515 <type>unit</type> | |
5516 </param> | |
5517 </plist> | |
5518 <plist name="none"> | |
5519 <param> | |
5520 <key>VALS</key> | |
5521 <val>[]</val> | |
5522 <type>double</type> | |
5523 </param> | |
5524 <param> | |
5525 <key>N</key> | |
5526 <val>1</val> | |
5527 <type>double</type> | |
5528 </param> | |
5529 <param> | |
5530 <key>DTYPE</key> | |
5531 <val/> | |
5532 <type>char</type> | |
5533 </param> | |
5534 <param> | |
5535 <key>FS</key> | |
5536 <val>[]</val> | |
5537 <type>double</type> | |
5538 </param> | |
5539 <param> | |
5540 <key>XVALS</key> | |
5541 <val>[]</val> | |
5542 <type>double</type> | |
5543 </param> | |
5544 <param> | |
5545 <key>YVALS</key> | |
5546 <val>[]</val> | |
5547 <type>double</type> | |
5548 </param> | |
5549 <param> | |
5550 <key>YUNITS</key> | |
5551 <val/> | |
5552 <type>char</type> | |
5553 </param> | |
5554 </plist> | |
5555 <plist name="none"> | |
5556 <param> | |
5557 <key>TSFCN</key> | |
5558 <val>sin(2*pi*7.433*t) + randn(size(t))</val> | |
5559 <type>char</type> | |
5560 </param> | |
5561 <param> | |
5562 <key>FS</key> | |
5563 <val>1000</val> | |
5564 <type>double</type> | |
5565 </param> | |
5566 <param> | |
5567 <key>NSECS</key> | |
5568 <val>10</val> | |
5569 <type>double</type> | |
5570 </param> | |
5571 <param> | |
5572 <key>T0</key> | |
5573 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
5574 <type>time</type> | |
5575 </param> | |
5576 <param> | |
5577 <key>XUNITS</key> | |
5578 <val>[ unit(' s ') ]</val> | |
5579 <type>unit</type> | |
5580 </param> | |
5581 <param> | |
5582 <key>YUNITS</key> | |
5583 <val>[ unit(' ') ]</val> | |
5584 <type>unit</type> | |
5585 </param> | |
5586 </plist> | |
5587 <plist name="none"> | |
5588 <param> | |
5589 <key>FSFCN</key> | |
5590 <val>f</val> | |
5591 <type>char</type> | |
5592 </param> | |
5593 <param> | |
5594 <key>F1</key> | |
5595 <val>1e-09</val> | |
5596 <type>double</type> | |
5597 </param> | |
5598 <param> | |
5599 <key>F2</key> | |
5600 <val>5</val> | |
5601 <type>double</type> | |
5602 </param> | |
5603 <param> | |
5604 <key>NF</key> | |
5605 <val>1000</val> | |
5606 <type>double</type> | |
5607 </param> | |
5608 <param> | |
5609 <key>SCALE</key> | |
5610 <val>log</val> | |
5611 <type>char</type> | |
5612 </param> | |
5613 <param> | |
5614 <key>F</key> | |
5615 <val>[]</val> | |
5616 <type>double</type> | |
5617 </param> | |
5618 <param> | |
5619 <key>XUNITS</key> | |
5620 <val>[ unit(' Hz ') ]</val> | |
5621 <type>unit</type> | |
5622 </param> | |
5623 <param> | |
5624 <key>YUNITS</key> | |
5625 <val>[ unit(' ') ]</val> | |
5626 <type>unit</type> | |
5627 </param> | |
5628 </plist> | |
5629 <plist name="none"> | |
5630 <param> | |
5631 <key>WIN</key> | |
5632 <val> specwin('Hanning', 100)</val> | |
5633 <type>specwin</type> | |
5634 </param> | |
5635 <param> | |
5636 <key>YUNITS</key> | |
5637 <val>[ unit(' ') ]</val> | |
5638 <type>unit</type> | |
5639 </param> | |
5640 </plist> | |
5641 <plist name="none"> | |
5642 <param> | |
5643 <key>WAVEFORM</key> | |
5644 <val>sine wave</val> | |
5645 <type>char</type> | |
5646 </param> | |
5647 <param> | |
5648 <key>A</key> | |
5649 <val>1</val> | |
5650 <type>double</type> | |
5651 </param> | |
5652 <param> | |
5653 <key>F</key> | |
5654 <val>1.23</val> | |
5655 <type>double</type> | |
5656 </param> | |
5657 <param> | |
5658 <key>PHI</key> | |
5659 <val>0</val> | |
5660 <type>double</type> | |
5661 </param> | |
5662 <param> | |
5663 <key>FS</key> | |
5664 <val>10</val> | |
5665 <type>double</type> | |
5666 </param> | |
5667 <param> | |
5668 <key>NSECS</key> | |
5669 <val>10</val> | |
5670 <type>double</type> | |
5671 </param> | |
5672 <param> | |
5673 <key>T0</key> | |
5674 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
5675 <type>time</type> | |
5676 </param> | |
5677 <param> | |
5678 <key>TOFF</key> | |
5679 <val>0</val> | |
5680 <type>double</type> | |
5681 </param> | |
5682 <param> | |
5683 <key>XUNITS</key> | |
5684 <val>[ unit(' s ') ]</val> | |
5685 <type>unit</type> | |
5686 </param> | |
5687 <param> | |
5688 <key>YUNITS</key> | |
5689 <val>[ unit(' ') ]</val> | |
5690 <type>unit</type> | |
5691 </param> | |
5692 </plist> | |
5693 <plist name="none"> | |
5694 <param> | |
5695 <key>POLYVAL</key> | |
5696 <val>[-0.0001 0.02 -1 -1]</val> | |
5697 <type>double</type> | |
5698 </param> | |
5699 <param> | |
5700 <key>NSECS</key> | |
5701 <val>10</val> | |
5702 <type>double</type> | |
5703 </param> | |
5704 <param> | |
5705 <key>FS</key> | |
5706 <val>10</val> | |
5707 <type>double</type> | |
5708 </param> | |
5709 <param> | |
5710 <key>T</key> | |
5711 <val>[]</val> | |
5712 <type>double</type> | |
5713 </param> | |
5714 <param> | |
5715 <key>XUNITS</key> | |
5716 <val>[ unit(' s ') ]</val> | |
5717 <type>unit</type> | |
5718 </param> | |
5719 <param> | |
5720 <key>YUNITS</key> | |
5721 <val>[ unit(' ') ]</val> | |
5722 <type>unit</type> | |
5723 </param> | |
5724 </plist> | |
5725 <plist name="none"> | |
5726 <param> | |
5727 <key>HOSTNAME</key> | |
5728 <val>localhost</val> | |
5729 <type>char</type> | |
5730 </param> | |
5731 <param> | |
5732 <key>DATABASE</key> | |
5733 <val>ltpda</val> | |
5734 <type>char</type> | |
5735 </param> | |
5736 <param> | |
5737 <key>ID</key> | |
5738 <val>[]</val> | |
5739 <type>double</type> | |
5740 </param> | |
5741 <param> | |
5742 <key>BINARY</key> | |
5743 <val>no</val> | |
5744 <type>char</type> | |
5745 </param> | |
5746 </plist> | |
5747 <plist name="none"> | |
5748 <param> | |
5749 <key>PLIST</key> | |
5750 <val>(empty-plist)</val> | |
5751 <type>plist</type> | |
5752 </param> | |
5753 </plist> | |
5754 <plist name="none"> | |
5755 <param> | |
5756 <key>PZMODEL</key> | |
5757 <val>pzmodel(none)</val> | |
5758 <type>pzmodel</type> | |
5759 </param> | |
5760 <param> | |
5761 <key>NSECS</key> | |
5762 <val>0</val> | |
5763 <type>double</type> | |
5764 </param> | |
5765 <param> | |
5766 <key>FS</key> | |
5767 <val>0</val> | |
5768 <type>double</type> | |
5769 </param> | |
5770 <param> | |
5771 <key>XUNITS</key> | |
5772 <val>[ unit(' s ') ]</val> | |
5773 <type>unit</type> | |
5774 </param> | |
5775 <param> | |
5776 <key>YUNITS</key> | |
5777 <val>[ unit(' ') ]</val> | |
5778 <type>unit</type> | |
5779 </param> | |
5780 </plist> | |
5781 <plist name="none"> | |
5782 <param> | |
5783 <key>MODEL</key> | |
5784 <val/> | |
5785 <type>char</type> | |
5786 </param> | |
5787 </plist> | |
5788 </plists> | |
5789 </LTPDAalgorithm> | |
5790 <plist name="none"> | |
5791 <param> | |
5792 <key>TSFCN</key> | |
5793 <val>sin(2*pi*7.433*t) + randn(size(t))</val> | |
5794 <type>char</type> | |
5795 </param> | |
5796 <param> | |
5797 <key>FS</key> | |
5798 <val>1000</val> | |
5799 <type>double</type> | |
5800 </param> | |
5801 <param> | |
5802 <key>NSECS</key> | |
5803 <val>10</val> | |
5804 <type>double</type> | |
5805 </param> | |
5806 <param> | |
5807 <key>T0</key> | |
5808 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
5809 <type>time</type> | |
5810 </param> | |
5811 <param> | |
5812 <key>XUNITS</key> | |
5813 <val>[ unit(' s ') ]</val> | |
5814 <type>unit</type> | |
5815 </param> | |
5816 <param> | |
5817 <key>YUNITS</key> | |
5818 <val>[ unit(' ') ]</val> | |
5819 <type>unit</type> | |
5820 </param> | |
5821 </plist> | |
5822 <port number="0" terminal="" type="output"> | |
5823 <node> | |
5824 <pipe color="-3657166" dstblock="a4" dstport="0" srcblock="a2" thickness="2.5"/> | |
5825 </node> | |
5826 </port> | |
5827 </block> | |
5828 <block bounds="26 249 59 56" inputs="1" name="bandpass" outputs="1"> | |
5829 <LTPDAalgorithm mcategory="Constructor" mclass="miir" mname="miir" mpackage="" mversion="" portdims="1 10 1 10"> | |
5830 <HelpText> MIIR IIR filter object class constructor. | |
5831 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
5832 | |
5833 DESCRIPTION: MIIR IIR filter object class constructor. | |
5834 Create a miir object. | |
5835 | |
5836 SUPER CLASSES: ltpda_filter < ltpda_uoh < ltpda_uo < ltpda_obj | |
5837 | |
5838 PROPERTIES: | |
5839 | |
5840 Inherit Properties (read only) | |
5841 name - name of object | |
5842 created - creation time (time-object) | |
5843 prov - contains a instance of the provenance class. | |
5844 hist - history of the object (history object) | |
5845 version - cvs-version string. | |
5846 fs - sample rate that the filter is designed for | |
5847 infile - filename if the filter was loaded from file | |
5848 a - set of numerator coefficients | |
5849 histout - output history values to filter | |
5850 | |
5851 Protected Properties (read only) | |
5852 ntaps - number of coefficients in the filter | |
5853 b - | |
5854 histin - input history values to filter | |
5855 | |
5856 MIIR Methods: | |
5857 | |
5858 Defined Abstract methods: | |
5859 char - returns one character string which represents the object | |
5860 copy - copies an object | |
5861 display - displays an object | |
5862 string - converts an object to a command string which will | |
5863 recreate the plist object. | |
5864 update_struct - updates a object structure to the current tbx-version | |
5865 | |
5866 Public methods: | |
5867 setHistin - set the property 'histin' | |
5868 redesign - redesign the input filter to work for the given sample rate. | |
5869 resp - make a frequency response of the filter. | |
5870 | |
5871 Protected methods: | |
5872 setB - set the property 'b' | |
5873 | |
5874 Private methods: | |
5875 fromPzmodel - construct an miir from a pzmodel | |
5876 fromAB - construct an miir from coefficients | |
5877 fromStandard - construct an miir from a standard types | |
5878 fromFile - construct an miir filter from a file | |
5879 fromRepository - construct an miir filter from a repository | |
5880 mklowpass - return a low pass filter | |
5881 mkhighpass - return a high pass filter | |
5882 mkbandpass - return a bandpass filter | |
5883 mkbandreject - return a low pass filter | |
5884 | |
5885 CONSTRUCTORS: | |
5886 | |
5887 f = miir() - creates an empty miir object. | |
5888 f = miir(fi) - creates a copy of the input miir object, fi. | |
5889 f = miir(pzm) - creates a miir object from a pole/zero model | |
5890 f = miir(pf) - creates a vector of miir objects from a parfrac model | |
5891 f = miir(a,b,fs) - creates a miir object from the coefficient | |
5892 vectors 'a' and 'b' **. | |
5893 The sample rate for which the filter is | |
5894 designed should be specified as well. | |
5895 f = miir('foo_iir.fil') - create a miir object from a | |
5896 LISO IIR .fil file. | |
5897 f = miir('foo_iir.xml') - create a miir object loading the miir object | |
5898 from disk. | |
5899 f = miir('foo_iir.mat') - create a miir object loading the miir object | |
5900 from disk. | |
5901 f = miir(pl) - create a miir object from the description | |
5902 given in the parameter list. | |
5903 | |
5904 Parameter sets for plist constructor (in order of priority): | |
5905 | |
5906 From XML File | |
5907 ------------- | |
5908 | |
5909 Construct an MIIR by loading it from an XML file. | |
5910 | |
5911 'filename' - construct an MIIR from a filename. | |
5912 Example: plist('filename', 'm1.xml') | |
5913 [default: empty string] | |
5914 | |
5915 From MAT File | |
5916 ------------- | |
5917 | |
5918 Construct an MIIR by loading it from a MAT file. | |
5919 | |
5920 'filename' - construct an MIIR from a filename. | |
5921 Example: plist('filename', 'm1.mat') | |
5922 [default: empty string] | |
5923 | |
5924 From LISO File | |
5925 -------------- | |
5926 | |
5927 Construct an MIIR by loading it from a LISO file. | |
5928 | |
5929 'filename' - construct an MIIR from a filename. | |
5930 Example: plist('filename', 'm1.fil') | |
5931 [default: empty string] | |
5932 | |
5933 From Repository | |
5934 --------------- | |
5935 | |
5936 Construct an MIIR by retrieving it from an LTPDA repository. | |
5937 | |
5938 'Hostname' - the repository hostname. Only those objects which | |
5939 are MIIRs are returned. | |
5940 [default: 'localhost']; | |
5941 | |
5942 Additional parameters: | |
5943 'Database' - The database name [default: 'ltpda'] | |
5944 'ID' - A vector of object IDs. [default: []] | |
5945 'CID' - Retrieve all MIIR objects from a particular | |
5946 collection. | |
5947 'Binary' - Set to 'yes' to retrieve from stored binary | |
5948 representation (not always available). | |
5949 | |
5950 From Standard Type | |
5951 ------------------ | |
5952 | |
5953 Construct an MIIR of a standard type. | |
5954 | |
5955 'type' - one of the types: 'highpass', 'lowpass', | |
5956 'bandpass', 'bandreject' [default: 'lowpass'] | |
5957 | |
5958 You can also specify optional parameters: | |
5959 'gain' - the gain of the filter [default: 1] | |
5960 'fc' - the roll-off frequency [default: 0.1 Hz] | |
5961 'fs' - the sampling frequency to design for [default: 1 Hz] | |
5962 'order' - the filter order [default: 1] | |
5963 'ripple' - pass/stop-band ripple for bandpass | |
5964 and bandreject filters [default: 0.5] | |
5965 'iunits' - the input unit of the filter | |
5966 'ounits' - the output unit of the filter | |
5967 | |
5968 From Parfrac | |
5969 ------------ | |
5970 | |
5971 Construct an MIIR from a parfrac. | |
5972 | |
5973 'parfrac' - a parfrac object to construct the filters from [default: empty parfrac] | |
5974 'fs' - sample rate for the filter(s) | |
5975 | |
5976 From Pzmodel | |
5977 ------------ | |
5978 | |
5979 Construct an MIIR from a pzmodel. | |
5980 | |
5981 'pzmodel' - a pzmodel object to construct the filter from [default: empty pzmodel] | |
5982 'fs' - sample rate for the filter | |
5983 | |
5984 From Plist | |
5985 ---------- | |
5986 | |
5987 'Plist' - construct from a plist. The value passed should be a plist | |
5988 object. | |
5989 [default: empty plist] | |
5990 | |
5991 EXAMPLE 1: Create an order 1 highpass filter with high frequency gain 2. | |
5992 Filter is designed for 10 Hz sampled data and has a cut-off | |
5993 frequency of 0.2 Hz. | |
5994 | |
5995 >> pl = plist('type', 'highpass', ... | |
5996 'order', 1, ... | |
5997 'gain', 2.0, ... | |
5998 'fs', 10, ... | |
5999 'fc', 0.2); | |
6000 >> f = miir(pl) | |
6001 | |
6002 NOTES: ** The convention used here for naming the filter coefficients is | |
6003 the opposite to MATLAB's convention. The recursion formula | |
6004 for this convention is | |
6005 | |
6006 b(1)*y(n) = a(1)*x(n) + a(2)*x(n-1) + ... + a(na+1)*x(n-na) | |
6007 - b(2)*y(n-1) - ... - b(nb+1)*y(n-nb) | |
6008 | |
6009 M-FILE INFO: The following call returns an minfo object that contains | |
6010 information about the miir constructor: | |
6011 >> info = miir.getInfo | |
6012 or >> info = miir.getInfo('miir') | |
6013 | |
6014 You can get information about class methods by calling: | |
6015 >> info = miir.getInfo(method) | |
6016 e.g. >> info = miir.getInfo('eq') | |
6017 | |
6018 You can also restrict the sets of parameters contained in | |
6019 the minfo object by calling: | |
6020 >> info = miir.getInfo(method, set) | |
6021 e.g. >> info = miir.getInfo('miir', 'From Pzmodel') | |
6022 | |
6023 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
6024 | |
6025 HISTORY: 09-02-2007 M Hewitson | |
6026 Creation | |
6027 11-02-2008 M Hueller | |
6028 Help fixed | |
6029 Default parameter list defined | |
6030 | |
6031 SEE ALSO: mfir, ltpda_filter, ltpda_uoh, ltpda_uo, ltpda_obj, plist | |
6032 | |
6033 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6034 </HelpText> | |
6035 <sets> | |
6036 <set name="Default"/> | |
6037 <set name="From XML File"/> | |
6038 <set name="From MAT File"/> | |
6039 <set name="From LISO File"/> | |
6040 <set name="From Repository"/> | |
6041 <set name="From Standard Type"/> | |
6042 <set name="From Parfrac"/> | |
6043 <set name="From Pzmodel"/> | |
6044 <set name="From AB"/> | |
6045 <set name="From Plist"/> | |
6046 </sets> | |
6047 <plists> | |
6048 <plist name="none"/> | |
6049 <plist name="none"> | |
6050 <param> | |
6051 <key>FILENAME</key> | |
6052 <val/> | |
6053 <type>char</type> | |
6054 </param> | |
6055 </plist> | |
6056 <plist name="none"> | |
6057 <param> | |
6058 <key>FILENAME</key> | |
6059 <val/> | |
6060 <type>char</type> | |
6061 </param> | |
6062 </plist> | |
6063 <plist name="none"> | |
6064 <param> | |
6065 <key>FILENAME</key> | |
6066 <val/> | |
6067 <type>char</type> | |
6068 </param> | |
6069 </plist> | |
6070 <plist name="none"> | |
6071 <param> | |
6072 <key>HOSTNAME</key> | |
6073 <val>localhost</val> | |
6074 <type>char</type> | |
6075 </param> | |
6076 <param> | |
6077 <key>DATABASE</key> | |
6078 <val>ltpda</val> | |
6079 <type>char</type> | |
6080 </param> | |
6081 <param> | |
6082 <key>ID</key> | |
6083 <val>[]</val> | |
6084 <type>double</type> | |
6085 </param> | |
6086 <param> | |
6087 <key>BINARY</key> | |
6088 <val>no</val> | |
6089 <type>char</type> | |
6090 </param> | |
6091 </plist> | |
6092 <plist name="none"> | |
6093 <param> | |
6094 <key>TYPE</key> | |
6095 <val>bandpass</val> | |
6096 <type>char</type> | |
6097 </param> | |
6098 <param> | |
6099 <key>FC</key> | |
6100 <val>[50 250]</val> | |
6101 <type>double</type> | |
6102 </param> | |
6103 <param> | |
6104 <key>GAIN</key> | |
6105 <val>1</val> | |
6106 <type>double</type> | |
6107 </param> | |
6108 <param> | |
6109 <key>FS</key> | |
6110 <val>1000</val> | |
6111 <type>double</type> | |
6112 </param> | |
6113 <param> | |
6114 <key>ORDER</key> | |
6115 <val>3</val> | |
6116 <type>double</type> | |
6117 </param> | |
6118 <param> | |
6119 <key>RIPPLE</key> | |
6120 <val>0.5</val> | |
6121 <type>double</type> | |
6122 </param> | |
6123 <param> | |
6124 <key>IUNITS</key> | |
6125 <val>[ unit(' ') ]</val> | |
6126 <type>unit</type> | |
6127 </param> | |
6128 <param> | |
6129 <key>OUNITS</key> | |
6130 <val>[ unit(' ') ]</val> | |
6131 <type>unit</type> | |
6132 </param> | |
6133 </plist> | |
6134 <plist name="none"> | |
6135 <param> | |
6136 <key>PARFRAC</key> | |
6137 <val>parfrac(none)</val> | |
6138 <type>parfrac</type> | |
6139 </param> | |
6140 <param> | |
6141 <key>FS</key> | |
6142 <val>[]</val> | |
6143 <type>double</type> | |
6144 </param> | |
6145 </plist> | |
6146 <plist name="none"> | |
6147 <param> | |
6148 <key>PZMODEL</key> | |
6149 <val>pzmodel(none)</val> | |
6150 <type>pzmodel</type> | |
6151 </param> | |
6152 <param> | |
6153 <key>FS</key> | |
6154 <val>[]</val> | |
6155 <type>double</type> | |
6156 </param> | |
6157 </plist> | |
6158 <plist name="none"> | |
6159 <param> | |
6160 <key>A</key> | |
6161 <val>[]</val> | |
6162 <type>double</type> | |
6163 </param> | |
6164 <param> | |
6165 <key>B</key> | |
6166 <val>[]</val> | |
6167 <type>double</type> | |
6168 </param> | |
6169 <param> | |
6170 <key>FS</key> | |
6171 <val>[]</val> | |
6172 <type>double</type> | |
6173 </param> | |
6174 </plist> | |
6175 <plist name="none"> | |
6176 <param> | |
6177 <key>PLIST</key> | |
6178 <val>[]</val> | |
6179 <type>double</type> | |
6180 </param> | |
6181 </plist> | |
6182 </plists> | |
6183 </LTPDAalgorithm> | |
6184 <plist name="none"> | |
6185 <param> | |
6186 <key>TYPE</key> | |
6187 <val>bandpass</val> | |
6188 <type>char</type> | |
6189 </param> | |
6190 <param> | |
6191 <key>FC</key> | |
6192 <val>[50 250]</val> | |
6193 <type>double</type> | |
6194 </param> | |
6195 <param> | |
6196 <key>GAIN</key> | |
6197 <val>1</val> | |
6198 <type>double</type> | |
6199 </param> | |
6200 <param> | |
6201 <key>FS</key> | |
6202 <val>1000</val> | |
6203 <type>double</type> | |
6204 </param> | |
6205 <param> | |
6206 <key>ORDER</key> | |
6207 <val>3</val> | |
6208 <type>double</type> | |
6209 </param> | |
6210 <param> | |
6211 <key>RIPPLE</key> | |
6212 <val>0.5</val> | |
6213 <type>double</type> | |
6214 </param> | |
6215 <param> | |
6216 <key>IUNITS</key> | |
6217 <val>[ unit(' ') ]</val> | |
6218 <type>unit</type> | |
6219 </param> | |
6220 <param> | |
6221 <key>OUNITS</key> | |
6222 <val>[ unit(' ') ]</val> | |
6223 <type>unit</type> | |
6224 </param> | |
6225 </plist> | |
6226 <port number="0" terminal="" type="output"> | |
6227 <node> | |
6228 <pipe color="-3657166" dstblock="a3" dstport="1" srcblock="bandpass" thickness="2.5"/> | |
6229 </node> | |
6230 </port> | |
6231 </block> | |
6232 <block bounds="155 214 55 57" inputs="2" name="a3" outputs="1"> | |
6233 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="filter" mpackage="" mversion="" portdims="1 10 1 10"> | |
6234 <HelpText> FILTER overrides the filter function for analysis objects. | |
6235 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6236 | |
6237 DESCRIPTION: FILTER overrides the filter function for analysis objects. | |
6238 Applies the input digital IIR/FIR filter to the input analysis | |
6239 object. If the input analysis object contains a | |
6240 time-series (tsdata) then the filter is applied using the normal | |
6241 recursion algorithm. The output analysis object contains a tsdata | |
6242 object. | |
6243 | |
6244 If the input analysis object contains a frequency-series (fsdata) | |
6245 then the response of the filter is computed and then multiplied | |
6246 with the input frequency series. The output analysis object | |
6247 contains a frequency series. | |
6248 | |
6249 CALL: >> [b, filt] = filter(a,pl) | |
6250 >> [b, filt] = filter(a,filt,pl) | |
6251 >> b = filter(a,pl) | |
6252 | |
6253 INPUTS: pl - a parameter list | |
6254 a - input analysis object | |
6255 | |
6256 OUTPUTS: filt - a copy of the input filter object with the | |
6257 history values filled in. | |
6258 (only possible if the ouput is a single AO) | |
6259 b - output analysis object containing the filtered data. | |
6260 | |
6261 PROCINFO: The input filter object with the history values filled in are | |
6262 always stored with a plist in the 'procinfo' property of the AO. | |
6263 The key of the plist to get the filter is 'Filter'. | |
6264 | |
6265 PARAMETERS: filter - the filter object to use to filter the data | |
6266 bank - specify if the bank of filters is intended to be | |
6267 'serial' or 'parallel' [default] | |
6268 | |
6269 M-FILE INFO: Get information about this methods by calling | |
6270 >> ao.getInfo('filter') | |
6271 | |
6272 Get information about a specified set-plist by calling: | |
6273 >> ao.getInfo('filter', 'None') | |
6274 | |
6275 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
6276 | |
6277 HISTORY: 11-02-07 M Hewitson | |
6278 Creation | |
6279 | |
6280 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6281 </HelpText> | |
6282 <sets> | |
6283 <set name="Default"/> | |
6284 </sets> | |
6285 <plists> | |
6286 <plist name="none"> | |
6287 <param> | |
6288 <key>FILTER</key> | |
6289 <val>PORT_1</val> | |
6290 <type>char</type> | |
6291 </param> | |
6292 <param> | |
6293 <key>GDOFF</key> | |
6294 <val>[]</val> | |
6295 <type>double</type> | |
6296 </param> | |
6297 <param> | |
6298 <key>BANK</key> | |
6299 <val>parallel</val> | |
6300 <type>char</type> | |
6301 </param> | |
6302 </plist> | |
6303 </plists> | |
6304 </LTPDAalgorithm> | |
6305 <plist name="none"> | |
6306 <param> | |
6307 <key>Unknown</key> | |
6308 <val/> | |
6309 <type>Char</type> | |
6310 </param> | |
6311 </plist> | |
6312 <port number="0" terminal="" type="output"> | |
6313 <node> | |
6314 <pipe color="-3657166" dstblock="a4" dstport="1" srcblock="a3" thickness="2.5"/> | |
6315 </node> | |
6316 </port> | |
6317 </block> | |
6318 <block bounds="236 97 60 51" inputs="2" name="a4" outputs="1"> | |
6319 <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="plus" mpackage="" mversion="" portdims="1 10 1 10"> | |
6320 <HelpText> PLUS implements addition operator for analysis objects. | |
6321 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6322 | |
6323 DESCRIPTION: PLUS implements addition operator for two analysis objects. | |
6324 | |
6325 CALL: a = a1+scalar | |
6326 a = a1+a2 | |
6327 | |
6328 M-FILE INFO: Get information about this methods by calling | |
6329 >> ao.getInfo('plus') | |
6330 | |
6331 Get information about a specified set-plist by calling: | |
6332 >> ao.getInfo('plus', 'None') | |
6333 | |
6334 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
6335 | |
6336 HISTORY: 01-02-07 M Hewitson | |
6337 Creation | |
6338 | |
6339 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6340 </HelpText> | |
6341 <sets> | |
6342 <set name="Default"/> | |
6343 </sets> | |
6344 <plists> | |
6345 <plist name="none"/> | |
6346 </plists> | |
6347 </LTPDAalgorithm> | |
6348 <plist name="none"/> | |
6349 <port number="0" terminal="" type="output"> | |
6350 <node> | |
6351 <pipe color="-3657166" dstblock="a8" dstport="0" srcblock="a4" thickness="2.5"/> | |
6352 </node> | |
6353 </port> | |
6354 </block> | |
6355 <block bounds="327 113 65 60" inputs="2" name="a8" outputs="1"> | |
6356 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="cohere" mpackage="" mversion="" portdims="1 10 1 10"> | |
6357 <HelpText> COHERE makes coherence estimates of the time-series objects | |
6358 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6359 | |
6360 DESCRIPTION: COHERE makes coherence estimates of the time-series objects | |
6361 in the input analysis objects. Coherences are computed using | |
6362 code based on MATLAB's mscohere (>> help mscohere). | |
6363 | |
6364 CALL: b = cohere(a1,a2,a3,...,pl) | |
6365 | |
6366 INPUTS: b - output analysis objects | |
6367 aN - input analysis objects (at least two) | |
6368 pl - input parameter list | |
6369 | |
6370 The function makes coherence estimates between all | |
6371 input AOs. Therefore, if the input argument list contains N | |
6372 analysis objects, the output, b, will contain NXN coherence estimates. | |
6373 | |
6374 If the last input argument is a parameter list (plist) it is used. | |
6375 The following parameters are recognised. | |
6376 | |
6377 PARAMETERS: Win - a specwin window object [default: Kaiser -200dB psll] | |
6378 Olap - segment percent overlap [default: taken from window function] | |
6379 Nfft - number of samples in each fft [default: half length of input data] | |
6380 Order - order of detrending. | |
6381 -1 - no detrending | |
6382 0 - subtract mean [default] | |
6383 1 - subtract linear fit | |
6384 N - subtract fit of polynomial, order N | |
6385 | |
6386 M-FILE INFO: Get information about this methods by calling | |
6387 >> ao.getInfo('cohere') | |
6388 | |
6389 Get information about a specified set-plist by calling: | |
6390 >> ao.getInfo('cohere', 'None') | |
6391 | |
6392 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
6393 | |
6394 HISTORY: 07-02-2007 M Hewitson | |
6395 Creation | |
6396 | |
6397 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6398 </HelpText> | |
6399 <sets> | |
6400 <set name="Default"/> | |
6401 </sets> | |
6402 <plists> | |
6403 <plist name="none"> | |
6404 <param> | |
6405 <key>NFFT</key> | |
6406 <val>1000</val> | |
6407 <type>double</type> | |
6408 </param> | |
6409 <param> | |
6410 <key>WIN</key> | |
6411 <val>Hanning</val> | |
6412 <type>specwin</type> | |
6413 </param> | |
6414 <param> | |
6415 <key>OLAP</key> | |
6416 <val>-1</val> | |
6417 <type>double</type> | |
6418 </param> | |
6419 <param> | |
6420 <key>ORDER</key> | |
6421 <val>0</val> | |
6422 <type>double</type> | |
6423 </param> | |
6424 </plist> | |
6425 </plists> | |
6426 </LTPDAalgorithm> | |
6427 <plist name="none"> | |
6428 <param> | |
6429 <key>NFFT</key> | |
6430 <val>1000</val> | |
6431 <type>double</type> | |
6432 </param> | |
6433 <param> | |
6434 <key>WIN</key> | |
6435 <val>Hanning</val> | |
6436 <type>specwin</type> | |
6437 </param> | |
6438 <param> | |
6439 <key>OLAP</key> | |
6440 <val>-1</val> | |
6441 <type>double</type> | |
6442 </param> | |
6443 <param> | |
6444 <key>ORDER</key> | |
6445 <val>0</val> | |
6446 <type>double</type> | |
6447 </param> | |
6448 </plist> | |
6449 <port number="0" terminal="" type="output"> | |
6450 <node> | |
6451 <pipe color="-3657166" dstblock="New Block" dstport="0" srcblock="a8" thickness="2.5"/> | |
6452 </node> | |
6453 </port> | |
6454 </block> | |
6455 <block bounds="419 115 68 58" inputs="1" name="New Block" outputs="1"> | |
6456 <LTPDAalgorithm mcategory="Output" mclass="ao" mname="iplot" mpackage="" mversion="" portdims="1 10 1 10"> | |
6457 <HelpText> IPLOT provides an intelligent plotting tool for LTPDA. | |
6458 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6459 | |
6460 DESCRIPTION: IPLOT provides an intelligent plotting tool for LTPDA. | |
6461 | |
6462 CALL: hfig = iplot (a,pl) | |
6463 [hfig, hax] = iplot (a,pl) | |
6464 [hfig, hax, hli] = iplot (a,pl) | |
6465 | |
6466 INPUTS: pl - a parameter list | |
6467 a - input analysis object | |
6468 | |
6469 OUTPUTS: hfig - handles to figures | |
6470 hax - handles to axes | |
6471 hli - handles to lines | |
6472 | |
6473 | |
6474 Plot parameters: | |
6475 | |
6476 'Arrangement' - select the plot layout: | |
6477 'single' - plots all AOs on individual figures | |
6478 'stacked' - plots all AOs on the same axes [default] | |
6479 'subplots' - plots all AOs on subplots | |
6480 | |
6481 'Function' - specify the plot function: | |
6482 'plot', 'stairs', 'stem' | |
6483 [default: 'plot'] | |
6484 *** doesn't work for xyzdata AOs | |
6485 | |
6486 Line parameters: | |
6487 | |
6488 The following properties take cell array values. If the length of | |
6489 the cell array is shorter than the number of lines to plot, the | |
6490 remaining lines will be plotted with the default options. If the | |
6491 cell array is of length 2 and the first cell contains the string | |
6492 'all', then the second cell is used to set the propery of all | |
6493 lines. | |
6494 | |
6495 'LineColors' - a cell array of color definitions for each line. | |
6496 | |
6497 'LineStyles' - a cell array of line styles. | |
6498 | |
6499 'Markers' - a cell array of markers. | |
6500 | |
6501 'LineWidths' - a cell array of line widths. If the length of the | |
6502 cell array is shorter than the number of lines to | |
6503 plot, the remaining lines will be plotted with | |
6504 the default line width. | |
6505 | |
6506 Axes parameters: | |
6507 | |
6508 'Legends' - specify a cell array of strings to be used for | |
6509 the plot legends. If a cell contains an empty | |
6510 string, the default legend string is built. | |
6511 If a single string 'off' is given instead of a | |
6512 cell array, then the legends are all switched | |
6513 off. | |
6514 | |
6515 'XLabels' - Specify the labels to be used on the x-axes. The | |
6516 units are added from the data object 'xunits' | |
6517 property. | |
6518 | |
6519 'YLabels' - Specify the labels to be used on the y-axes. The | |
6520 units are added from the data object 'yunits' | |
6521 property. If the object contains complex data, | |
6522 you should specify two y-labels for that object. | |
6523 | |
6524 The following axis properties also work with the 'all' keyword as | |
6525 described above in the line properties section. | |
6526 | |
6527 'XScales' - Specify the scales to be used on the x-axes. | |
6528 | |
6529 'YScales' - Specify the scales to the used on the y-axes. If | |
6530 an object contains complex data, you should | |
6531 specify two y-labels for that object. | |
6532 | |
6533 'XRanges' - Specify the ranges to be displayed on the x-axes. | |
6534 | |
6535 'YRanges' - Specify the ranges to the displayed on the | |
6536 y-axes. | |
6537 | |
6538 Error parameters: If you give more than one input AO then you must | |
6539 specify the following parameter values in a cell-array, | |
6540 one cell for each input AO. Leave the cell empty to | |
6541 plot no errors. Each error can be a value or a vector | |
6542 the same length as the data vector. If you give and | |
6543 upper limit but not lower limit, then the errors are | |
6544 assumed to be symmetric (and vice versa) | |
6545 | |
6546 'XerrL' - lower bound error values for the X data points. | |
6547 'XerrU' - upper bound error values for the X data points. | |
6548 'YerrL' - lower bound error values for the Y data points. | |
6549 'YerrU' - upper bound error values for the Y data points. | |
6550 | |
6551 Math operations: You can specify rudimentary math operations to be | |
6552 performed on the X and Y data prior to plotting. The | |
6553 'all' keyword is also supported by these parameters. | |
6554 | |
6555 'Xmaths' - specify math operations to perform on the | |
6556 data vector 'x'. For example, | |
6557 plist('Xmaths', 'abs(x)'). | |
6558 | |
6559 'Ymaths' - specify math operations to perform on the | |
6560 data vector 'y'. For example, | |
6561 plist('Ymaths', 'sqrt(y)'). | |
6562 | |
6563 Time-series parameters: in addition to the general options, time-series | |
6564 objects have the following additional parameters. | |
6565 | |
6566 'Xunits' - specify the units on the x-axis as | |
6567 'us' - microseconds | |
6568 'ms' - milliseconds | |
6569 's' - seconds [default] | |
6570 'm' - minutes | |
6571 'h' - hours | |
6572 'D' - days | |
6573 'M' - months | |
6574 'HH:MM:SS' - using a date/time format | |
6575 recognized by datetic (help datetic) | |
6576 | |
6577 | |
6578 Frequency-series parameters: | |
6579 | |
6580 'complexPlotType' - specify how to plot complex data. | |
6581 Choose from: | |
6582 - 'realimag' | |
6583 - 'absdeg' | |
6584 - 'absrad' | |
6585 | |
6586 EXAMPLES: | |
6587 | |
6588 1) Plot two time-series AOs with different colors, line styles, and widths | |
6589 | |
6590 pl = plist('Linecolors', {'g', 'k'}, 'LineStyles', {'', '--'}, 'LineWidths', {1, 4}); | |
6591 iplot(tsao1, tsao2, pl); | |
6592 | |
6593 2) Plot two time-series AOs in subplots. Also override the second legend | |
6594 text and the first line style. | |
6595 | |
6596 pl = plist('Arrangement', 'subplots', 'LineStyles', {'--'}, 'Legends', {'', 'My Sine Wave'}); | |
6597 iplot(tsao1, tsao2, pl); | |
6598 | |
6599 3) Plot two time-series AOs taking the square of the y-values of the | |
6600 first AO and the log of the x-values of the second AO. | |
6601 | |
6602 pl = plist('Arrangement', 'subplots', 'YMaths', 'y.^2', 'XMaths', {'', 'log(x)'}); | |
6603 iplot(tsao1, tsao2, pl); | |
6604 | |
6605 4) Plot two frequency-series AOs on subplots with the same Y-scales and | |
6606 Y-ranges | |
6607 | |
6608 pl1 = plist('Yscales', {'All', 'lin'}); | |
6609 pl2 = plist('arrangement', 'subplots', 'YRanges', {'All', [1e-6 100]}); | |
6610 iplot(fsd1, fsd2, pl1, pl2) | |
6611 | |
6612 | |
6613 M-FILE INFO: Get information about this methods by calling | |
6614 >> ao.getInfo('iplot') | |
6615 | |
6616 Get information about a specified set-plist by calling: | |
6617 >> ao.getInfo('iplot', 'None') | |
6618 | |
6619 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
6620 | |
6621 HISTORY: 22-12-07 M Hewitson | |
6622 Creation | |
6623 | |
6624 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6625 </HelpText> | |
6626 <sets> | |
6627 <set name="Time-series plot"/> | |
6628 <set name="Frequency-series plot"/> | |
6629 <set name="Y data plot"/> | |
6630 <set name="X-Y data plot"/> | |
6631 <set name="3D plot"/> | |
6632 </sets> | |
6633 <plists> | |
6634 <plist name="none"> | |
6635 <param> | |
6636 <key>COLORS</key> | |
6637 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
6638 <type>cell</type> | |
6639 </param> | |
6640 <param> | |
6641 <key>ARRANGEMENT</key> | |
6642 <val>stacked</val> | |
6643 <type>char</type> | |
6644 </param> | |
6645 <param> | |
6646 <key>FUNCTION</key> | |
6647 <val>plot</val> | |
6648 <type>char</type> | |
6649 </param> | |
6650 <param> | |
6651 <key>LEGENDLOCATION</key> | |
6652 <val>NorthEast</val> | |
6653 <type>char</type> | |
6654 </param> | |
6655 <param> | |
6656 <key>XERRL</key> | |
6657 <val>[]</val> | |
6658 <type>double</type> | |
6659 </param> | |
6660 <param> | |
6661 <key>XERRU</key> | |
6662 <val>[]</val> | |
6663 <type>double</type> | |
6664 </param> | |
6665 <param> | |
6666 <key>YERRU</key> | |
6667 <val>[]</val> | |
6668 <type>double</type> | |
6669 </param> | |
6670 <param> | |
6671 <key>YERRL</key> | |
6672 <val>[]</val> | |
6673 <type>double</type> | |
6674 </param> | |
6675 <param> | |
6676 <key>XLABEL</key> | |
6677 <val>Time</val> | |
6678 <type>char</type> | |
6679 </param> | |
6680 <param> | |
6681 <key>YLABEL</key> | |
6682 <val>Amplitude</val> | |
6683 <type>char</type> | |
6684 </param> | |
6685 </plist> | |
6686 <plist name="none"> | |
6687 <param> | |
6688 <key>COLORS</key> | |
6689 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
6690 <type>cell</type> | |
6691 </param> | |
6692 <param> | |
6693 <key>ARRANGEMENT</key> | |
6694 <val>stacked</val> | |
6695 <type>char</type> | |
6696 </param> | |
6697 <param> | |
6698 <key>FUNCTION</key> | |
6699 <val>plot</val> | |
6700 <type>char</type> | |
6701 </param> | |
6702 <param> | |
6703 <key>LEGENDLOCATION</key> | |
6704 <val>NorthEast</val> | |
6705 <type>char</type> | |
6706 </param> | |
6707 <param> | |
6708 <key>XERRL</key> | |
6709 <val>[]</val> | |
6710 <type>double</type> | |
6711 </param> | |
6712 <param> | |
6713 <key>XERRU</key> | |
6714 <val>[]</val> | |
6715 <type>double</type> | |
6716 </param> | |
6717 <param> | |
6718 <key>YERRU</key> | |
6719 <val>[]</val> | |
6720 <type>double</type> | |
6721 </param> | |
6722 <param> | |
6723 <key>YERRL</key> | |
6724 <val>[]</val> | |
6725 <type>double</type> | |
6726 </param> | |
6727 <param> | |
6728 <key>COMPLEXPLOTTYPE</key> | |
6729 <val>absdeg</val> | |
6730 <type>char</type> | |
6731 </param> | |
6732 <param> | |
6733 <key>XLABEL</key> | |
6734 <val>Frequency</val> | |
6735 <type>char</type> | |
6736 </param> | |
6737 </plist> | |
6738 <plist name="none"> | |
6739 <param> | |
6740 <key>COLORS</key> | |
6741 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
6742 <type>cell</type> | |
6743 </param> | |
6744 <param> | |
6745 <key>ARRANGEMENT</key> | |
6746 <val>stacked</val> | |
6747 <type>char</type> | |
6748 </param> | |
6749 <param> | |
6750 <key>FUNCTION</key> | |
6751 <val>plot</val> | |
6752 <type>char</type> | |
6753 </param> | |
6754 <param> | |
6755 <key>LEGENDLOCATION</key> | |
6756 <val>NorthEast</val> | |
6757 <type>char</type> | |
6758 </param> | |
6759 <param> | |
6760 <key>XERRL</key> | |
6761 <val>[]</val> | |
6762 <type>double</type> | |
6763 </param> | |
6764 <param> | |
6765 <key>XERRU</key> | |
6766 <val>[]</val> | |
6767 <type>double</type> | |
6768 </param> | |
6769 <param> | |
6770 <key>YERRU</key> | |
6771 <val>[]</val> | |
6772 <type>double</type> | |
6773 </param> | |
6774 <param> | |
6775 <key>YERRL</key> | |
6776 <val>[]</val> | |
6777 <type>double</type> | |
6778 </param> | |
6779 <param> | |
6780 <key>XLABEL</key> | |
6781 <val>Sample</val> | |
6782 <type>char</type> | |
6783 </param> | |
6784 <param> | |
6785 <key>YLABEL</key> | |
6786 <val>Value</val> | |
6787 <type>char</type> | |
6788 </param> | |
6789 </plist> | |
6790 <plist name="none"> | |
6791 <param> | |
6792 <key>COLORS</key> | |
6793 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
6794 <type>cell</type> | |
6795 </param> | |
6796 <param> | |
6797 <key>ARRANGEMENT</key> | |
6798 <val>stacked</val> | |
6799 <type>char</type> | |
6800 </param> | |
6801 <param> | |
6802 <key>FUNCTION</key> | |
6803 <val>plot</val> | |
6804 <type>char</type> | |
6805 </param> | |
6806 <param> | |
6807 <key>LEGENDLOCATION</key> | |
6808 <val>NorthEast</val> | |
6809 <type>char</type> | |
6810 </param> | |
6811 <param> | |
6812 <key>XERRL</key> | |
6813 <val>[]</val> | |
6814 <type>double</type> | |
6815 </param> | |
6816 <param> | |
6817 <key>XERRU</key> | |
6818 <val>[]</val> | |
6819 <type>double</type> | |
6820 </param> | |
6821 <param> | |
6822 <key>YERRU</key> | |
6823 <val>[]</val> | |
6824 <type>double</type> | |
6825 </param> | |
6826 <param> | |
6827 <key>YERRL</key> | |
6828 <val>[]</val> | |
6829 <type>double</type> | |
6830 </param> | |
6831 <param> | |
6832 <key>XLABEL</key> | |
6833 <val>X-data</val> | |
6834 <type>char</type> | |
6835 </param> | |
6836 <param> | |
6837 <key>YLABEL</key> | |
6838 <val>Y-data</val> | |
6839 <type>char</type> | |
6840 </param> | |
6841 <param> | |
6842 <key>YMATHS</key> | |
6843 <val/> | |
6844 <type>char</type> | |
6845 </param> | |
6846 <param> | |
6847 <key>XMATHS</key> | |
6848 <val/> | |
6849 <type>char</type> | |
6850 </param> | |
6851 </plist> | |
6852 <plist name="none"> | |
6853 <param> | |
6854 <key>COLORS</key> | |
6855 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
6856 <type>cell</type> | |
6857 </param> | |
6858 <param> | |
6859 <key>ARRANGEMENT</key> | |
6860 <val>single</val> | |
6861 <type>char</type> | |
6862 </param> | |
6863 <param> | |
6864 <key>XLABEL</key> | |
6865 <val>Time</val> | |
6866 <type>char</type> | |
6867 </param> | |
6868 <param> | |
6869 <key>YLABEL</key> | |
6870 <val>Frequency</val> | |
6871 <type>char</type> | |
6872 </param> | |
6873 <param> | |
6874 <key>ZLABEL</key> | |
6875 <val>Amplitude</val> | |
6876 <type>char</type> | |
6877 </param> | |
6878 <param> | |
6879 <key>YMATHS</key> | |
6880 <val/> | |
6881 <type>char</type> | |
6882 </param> | |
6883 <param> | |
6884 <key>ZMATHS</key> | |
6885 <val/> | |
6886 <type>char</type> | |
6887 </param> | |
6888 <param> | |
6889 <key>XMATHS</key> | |
6890 <val/> | |
6891 <type>char</type> | |
6892 </param> | |
6893 </plist> | |
6894 </plists> | |
6895 </LTPDAalgorithm> | |
6896 <plist name="none"/> | |
6897 <port number="0" terminal="" type="output"/> | |
6898 </block> | |
6899 </document> | |
6900 <document name="Test AO_curvefit" parentDiag="" visible="true" windowHeight="624" windowState="maximized" windowWidth="718" windowX="0" windowY="0" zoomFactor="1.21"> | |
6901 <block bounds="58 24 59 60" inputs="1" name="a1" outputs="1"> | |
6902 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
6903 <HelpText> AO analysis object class constructor. | |
6904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
6905 | |
6906 DESCRIPTION: AO analysis object class constructor. | |
6907 Create an analysis object. | |
6908 | |
6909 Possible constructors: | |
6910 | |
6911 a = ao() - creates an empty analysis object | |
6912 a = ao('a1.xml') - creates a new analysis object by loading the | |
6913 analysis object from disk. | |
6914 a = ao('a1.mat') - creates a new analysis object by loading the | |
6915 analysis object from disk. | |
6916 a = ao('a1.mat') - creates a new analysis object by loading the | |
6917 2-column data set stored in the .MAT file. | |
6918 a = ao('file.txt') - creates a new analysis object by loading the | |
6919 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
6920 to be an equally sampled two-column file of | |
6921 time and amplitude. By default, the amplitude | |
6922 units are taken to be Volts ('V') and the | |
6923 time samples are assumed to be in seconds. | |
6924 a = ao('file',pl) - creates a new analysis object by loading the | |
6925 data in 'file'. The parameter list decide how the | |
6926 analysis object is created. The valid key values | |
6927 of the parameter list are: | |
6928 'type' 'tsdata','fsdata','xydata' | |
6929 [default: 'tsdata'] | |
6930 'use_fs' if this value is set, the | |
6931 x-axes is computed by the fs value. | |
6932 [default: empty array] | |
6933 'columns' [1 2 1 4] | |
6934 Each pair represented the x- and y-axes. | |
6935 (Each column pair creates an analysis object) | |
6936 Is the value 'use_fs' is used then | |
6937 represent each column the y-axes. | |
6938 (Each column creates an analysis object) | |
6939 [default: [1 2] ] | |
6940 'comment_char' The comment character in the file | |
6941 [default: ''] | |
6942 'description' To set the description in the analysis object | |
6943 '...' every property where exist a public | |
6944 set-function in the AO class e.g. | |
6945 setName, setT0, setYunits, ... | |
6946 If the constructor creates multiple ao's it is | |
6947 possible to give each data class its own e.g. | |
6948 'name'. In this case the parameter list with the | |
6949 key 'name' must have cell of the different values | |
6950 as the name of the different data objects. e.g. | |
6951 pl = plist('columns', [1 2 1 3], ... | |
6952 'name', {'name1' 'name2'}, ... | |
6953 'xunits', unit('s'), ... | |
6954 'yunits', {unit('V') unit('Hz'})); | |
6955 This parameter list creates two ao's with tsdata. | |
6956 | |
6957 'Robust' - set this to 'yes' to use (slow) | |
6958 robust data reading. Useful for | |
6959 complicated file formats. | |
6960 [default: 'yes'] | |
6961 | |
6962 NOTE: Data files with comments at the end of the lines can only be | |
6963 read if there are no lines with only comments. In this case, do not | |
6964 specify a comment character. If you really want to load a file like | |
6965 this, specify the 'Robust' option; this will be very slow for large | |
6966 files. | |
6967 | |
6968 a = ao(data) - creates an analysis object with a data | |
6969 object. Data object can be one of tsdata, | |
6970 fsdata, cdata, xydata, xyzdata. | |
6971 a = ao(data, hist) - creates an analysis object with a data | |
6972 object and a history object | |
6973 a = ao(specwin) - creates an analysis object from a specwin | |
6974 object | |
6975 a = ao(plist) - creates an analysis object from the description | |
6976 given in the parameter list | |
6977 | |
6978 Parameter sets for plist constructor (in order of priority): | |
6979 | |
6980 From XML File | |
6981 ------------- | |
6982 | |
6983 Construct an AO by loading it from an XML file. | |
6984 | |
6985 'filename' - construct an AO from a filename. | |
6986 Example: plist('filename', 'a1.xml') | |
6987 [default: empty string] | |
6988 | |
6989 From MAT File | |
6990 ------------- | |
6991 | |
6992 Construct an AO by loading it from a MAT file. | |
6993 | |
6994 'filename' - construct an AO from a filename. | |
6995 Example: plist('filename', 'a1.mat') | |
6996 [default: empty string] | |
6997 | |
6998 From ASCII File | |
6999 --------------- | |
7000 | |
7001 Construct an AO by loading it from an ASCII text file. | |
7002 | |
7003 'filename' - construct an AO from a filename. | |
7004 Example: plist('filename', 'a1.txt') | |
7005 [default: empty string] | |
7006 | |
7007 For additional parameters, see constructor ao(file, pl) above. | |
7008 | |
7009 From Function | |
7010 ------------- | |
7011 | |
7012 Construct an AO from the description of any valid MATLAB function. | |
7013 | |
7014 'fcn' - any valid MATLAB function. | |
7015 Example: plist('fcn', 'randn(100,1)') | |
7016 | |
7017 You can pass additional parameters to the fcn as extra | |
7018 parameters in the parameter list: | |
7019 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
7020 | |
7021 ** Note: case is ignored in the function specification | |
7022 such the following: | |
7023 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
7024 results in: | |
7025 2*2*[1:20] | |
7026 | |
7027 [default: 'randn(100,1)'] | |
7028 | |
7029 From Values | |
7030 ----------- | |
7031 | |
7032 Construct an AO from a set of values. | |
7033 | |
7034 'vals' - a set of values. | |
7035 Example: plist('vals', [1 2 3]) | |
7036 optional parameter: repeat 'N' times | |
7037 Example: plist('vals', [1 2 3], 'N', 10) | |
7038 | |
7039 [default: vals: [1], N: [1] ] | |
7040 OR | |
7041 | |
7042 To produce a tsdata AO | |
7043 | |
7044 'xvals' - a set of x values. | |
7045 'yvals' - a set of y values. | |
7046 | |
7047 | |
7048 | |
7049 From Time-series Function | |
7050 ------------------------- | |
7051 | |
7052 Construct an AO from a function of time, t. | |
7053 | |
7054 'tsfcn' - a function of time. | |
7055 | |
7056 You can also specify optional parameters | |
7057 'fs' - sampling frequency [default: 10 Hz] | |
7058 'nsecs' - length in seconds [default: 10 s] | |
7059 | |
7060 You can also specify the initial time (t0) associated with | |
7061 the time-series by passing a parameter 't0' with a value | |
7062 that is a time object [default: time(0)] | |
7063 Example: | |
7064 plist('fs', 10, 'nsecs', 10, ... | |
7065 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
7066 't0', time('1980-12-01 12:43:12')); | |
7067 | |
7068 From Frequency-series Function | |
7069 ------------------------------ | |
7070 | |
7071 Construct an AO from a function of frequency, f. | |
7072 | |
7073 'fsfcn' - a function of frequency, f. [default: 'f'] | |
7074 | |
7075 You can also specify optional parameters: | |
7076 'f1' - the initial frequency [default: 1e-9] | |
7077 'f2' - the final frequency [default: 5] | |
7078 'nf' - the number of frequency samples [default: 1000] | |
7079 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
7080 or provide a frequency vector: | |
7081 'f' - a vector of frequencies on which to evaluate the | |
7082 function [default: [] ] | |
7083 | |
7084 From Window | |
7085 ----------- | |
7086 | |
7087 Construct an AO from a spectral window object. | |
7088 | |
7089 'win' - A specwin object. | |
7090 | |
7091 This creates a cdata type AO containing the window values. | |
7092 Example: plist('win', specwin('Hannning', 100)) | |
7093 | |
7094 [default: specwin('Hanning', 100)] | |
7095 | |
7096 From Waveform | |
7097 ------------- | |
7098 | |
7099 Construct an AO from a waveform description. | |
7100 | |
7101 'waveform' - a waveform description (see options below). | |
7102 | |
7103 You can also specify additional parameters: | |
7104 'fs' - sampling frequency [default: 10 Hz] | |
7105 'nsecs' - length in seconds [default: 10 s] | |
7106 't0' - time-stamp of the first data sample [default time(0)] | |
7107 | |
7108 and, for the following waveform types: | |
7109 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
7110 (can be vectors for sum of sine waves) | |
7111 'A' - Amplitude of the wave | |
7112 'f' - Frequency of the wave | |
7113 'phi' - Phase of the eave | |
7114 'nsecs' - Number of seconds (in seconds) | |
7115 'toff' - Offset of the wave (in seconds) | |
7116 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
7117 'sigma' specify the standard deviation | |
7118 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
7119 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
7120 'Square wave' - 'f', 'duty' (help square) | |
7121 'Sawtooth' - 'f', 'width' (help sawtooth) | |
7122 | |
7123 You can also specify the initial time (t0) associated with | |
7124 the time-series by passing a parameter 't0' with a value | |
7125 that is a time object. | |
7126 | |
7127 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
7128 fs: 10, nsecs: 10, t0: time(0) ] | |
7129 | |
7130 | |
7131 From Repository | |
7132 --------------- | |
7133 | |
7134 Construct an AO by retrieving it from an LTPDA repository. | |
7135 | |
7136 'Hostname' - the repository hostname. Only those objects which | |
7137 are AOs are returned. | |
7138 [default: 'localhost']; | |
7139 | |
7140 Additional parameters: | |
7141 | |
7142 'Database' - The database name [default: 'ltpda'] | |
7143 'ID' - A vector of object IDs. [default: []] | |
7144 'CID' - Retrieve all AO objects from a particular | |
7145 collection. | |
7146 'Binary' - Set to 'yes' to retrieve from stored binary | |
7147 representation (not always available). | |
7148 | |
7149 From Polynomial | |
7150 --------------- | |
7151 | |
7152 Construct an AO from a set of polynomial coefficients. | |
7153 | |
7154 'polyval' - a set of polynomial coefficients. | |
7155 [default: [-0.0001 0.02 -1 -1] ] | |
7156 | |
7157 Additional parameters: | |
7158 'Nsecs' and 'fs' - number of seconds, and sample rate | |
7159 [defaults: nsecs: 10, fs: 10] | |
7160 or 't' - vector of time vertices | |
7161 [default: [] ] | |
7162 | |
7163 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
7164 | |
7165 | |
7166 From Pzmodel | |
7167 ------------ | |
7168 | |
7169 Generates an ao with a timeseries with a prescribed spectrum. | |
7170 p = [pz(f1,q1) pz(f2,q2)] | |
7171 z = [pz(f3,q3)] | |
7172 pzm = pzmodel(gain, p, z) | |
7173 The constructor also needs: fs - sampling frequency | |
7174 nsecs - number of seconds to be generated | |
7175 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
7176 | |
7177 From Model | |
7178 ---------- | |
7179 | |
7180 A collection of built-in models which construct data series and return | |
7181 them in AOs. | |
7182 | |
7183 'Model' - give the model name. To get a list of models: | |
7184 ao(plist('Model', '')) | |
7185 | |
7186 Each model has additional parameters that need to be passed. To see the | |
7187 parameters: | |
7188 >> help ao.<model_name> | |
7189 | |
7190 for example, | |
7191 | |
7192 >> help ao.mdc1_fd_dynamics | |
7193 | |
7194 From Plist | |
7195 ---------- | |
7196 | |
7197 'Plist' - construct from a plist. The value passed should be a plist | |
7198 object. | |
7199 [default: empty plist] | |
7200 | |
7201 | |
7202 | |
7203 Examples: | |
7204 | |
7205 1) Normally distributed random noise time-series | |
7206 | |
7207 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
7208 rd10 = ao(p); | |
7209 | |
7210 | |
7211 Indexing: | |
7212 b = a(1) % where a is an array of analysis objects | |
7213 d = a.data; % get the data object | |
7214 h = a.hist; % get the history object | |
7215 d = a.data.x(1:20); % get a matrix of data values x; | |
7216 | |
7217 2) Timeseries with a prescribed spectrum | |
7218 | |
7219 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
7220 a = ao(p) | |
7221 | |
7222 fs - sampling frequency | |
7223 nsecs - number of seconds in time series | |
7224 ndigits - number of digits for symbolic math toolbox (default: 32) | |
7225 | |
7226 | |
7227 From pzmodel | |
7228 ------------ | |
7229 | |
7230 Generates an ao with a timeseries with a prescribed spectrum. | |
7231 p = [pz(f1,q1) pz(f2,q2)] | |
7232 z = [pz(f3,q3)] | |
7233 pzm = pzmodel(gain, p, z) | |
7234 The constructor also needs: fs - sampling frequency | |
7235 nsecs - number of seconds to be generated | |
7236 a = ao(pzm, nsecs, fs) | |
7237 | |
7238 The following call returns an minfo object that contains information | |
7239 about the AO constructor: | |
7240 | |
7241 >> info = ao.getInfo | |
7242 | |
7243 You can get information about class methods by calling: | |
7244 | |
7245 >> info = ao.getInfo(method) | |
7246 | |
7247 e.g. info = ao.getInfo('psd') | |
7248 | |
7249 You can also restrict the sets of parameters contained in the minfo | |
7250 object by calling: | |
7251 | |
7252 >> info = ao.getInfo(method, set) | |
7253 | |
7254 e.g., info = ao.getInfo('ao', 'From Vals') | |
7255 | |
7256 See also tsdata, fsdata, xydata, cdata, xyzdata | |
7257 | |
7258 M Hewitson 30-01-07 | |
7259 | |
7260 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
7261 </HelpText> | |
7262 <sets> | |
7263 <set name="Default"/> | |
7264 <set name="From XML File"/> | |
7265 <set name="From MAT File"/> | |
7266 <set name="From ASCII File"/> | |
7267 <set name="From Function"/> | |
7268 <set name="From Values"/> | |
7269 <set name="From Time-series Function"/> | |
7270 <set name="From Frequency-series Function"/> | |
7271 <set name="From Window"/> | |
7272 <set name="From Waveform"/> | |
7273 <set name="From Polynomial"/> | |
7274 <set name="From Repository"/> | |
7275 <set name="From Plist"/> | |
7276 <set name="From Pzmodel"/> | |
7277 <set name="From Model"/> | |
7278 </sets> | |
7279 <plists> | |
7280 <plist name="none"/> | |
7281 <plist name="none"> | |
7282 <param> | |
7283 <key>FILENAME</key> | |
7284 <val/> | |
7285 <type>char</type> | |
7286 </param> | |
7287 </plist> | |
7288 <plist name="none"> | |
7289 <param> | |
7290 <key>FILENAME</key> | |
7291 <val/> | |
7292 <type>char</type> | |
7293 </param> | |
7294 </plist> | |
7295 <plist name="none"> | |
7296 <param> | |
7297 <key>FILENAME</key> | |
7298 <val/> | |
7299 <type>char</type> | |
7300 </param> | |
7301 <param> | |
7302 <key>TYPE</key> | |
7303 <val>tsdata</val> | |
7304 <type>char</type> | |
7305 </param> | |
7306 <param> | |
7307 <key>COLUMNS</key> | |
7308 <val>[1 2]</val> | |
7309 <type>double</type> | |
7310 </param> | |
7311 <param> | |
7312 <key>XUNITS</key> | |
7313 <val>[ unit(' s ') ]</val> | |
7314 <type>unit</type> | |
7315 </param> | |
7316 <param> | |
7317 <key>YUNITS</key> | |
7318 <val>[ unit(' ') ]</val> | |
7319 <type>unit</type> | |
7320 </param> | |
7321 <param> | |
7322 <key>T0</key> | |
7323 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
7324 <type>time</type> | |
7325 </param> | |
7326 <param> | |
7327 <key>COMMENT_CHAR</key> | |
7328 <val/> | |
7329 <type>char</type> | |
7330 </param> | |
7331 <param> | |
7332 <key>USE_FS</key> | |
7333 <val/> | |
7334 <type>char</type> | |
7335 </param> | |
7336 <param> | |
7337 <key>ROBUST</key> | |
7338 <val>yes</val> | |
7339 <type>char</type> | |
7340 </param> | |
7341 </plist> | |
7342 <plist name="none"> | |
7343 <param> | |
7344 <key>FCN</key> | |
7345 <val>randn(100,1)</val> | |
7346 <type>char</type> | |
7347 </param> | |
7348 <param> | |
7349 <key>YUNITS</key> | |
7350 <val>[ unit(' ') ]</val> | |
7351 <type>unit</type> | |
7352 </param> | |
7353 </plist> | |
7354 <plist name="none"> | |
7355 <param> | |
7356 <key>VALS</key> | |
7357 <val>[]</val> | |
7358 <type>double</type> | |
7359 </param> | |
7360 <param> | |
7361 <key>N</key> | |
7362 <val>1</val> | |
7363 <type>double</type> | |
7364 </param> | |
7365 <param> | |
7366 <key>DTYPE</key> | |
7367 <val/> | |
7368 <type>char</type> | |
7369 </param> | |
7370 <param> | |
7371 <key>FS</key> | |
7372 <val>[]</val> | |
7373 <type>double</type> | |
7374 </param> | |
7375 <param> | |
7376 <key>XVALS</key> | |
7377 <val>[]</val> | |
7378 <type>double</type> | |
7379 </param> | |
7380 <param> | |
7381 <key>YVALS</key> | |
7382 <val>[]</val> | |
7383 <type>double</type> | |
7384 </param> | |
7385 <param> | |
7386 <key>YUNITS</key> | |
7387 <val/> | |
7388 <type>char</type> | |
7389 </param> | |
7390 </plist> | |
7391 <plist name="none"> | |
7392 <param> | |
7393 <key>TSFCN</key> | |
7394 <val>t</val> | |
7395 <type>char</type> | |
7396 </param> | |
7397 <param> | |
7398 <key>FS</key> | |
7399 <val>10</val> | |
7400 <type>double</type> | |
7401 </param> | |
7402 <param> | |
7403 <key>NSECS</key> | |
7404 <val>1</val> | |
7405 <type>double</type> | |
7406 </param> | |
7407 <param> | |
7408 <key>T0</key> | |
7409 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
7410 <type>time</type> | |
7411 </param> | |
7412 <param> | |
7413 <key>XUNITS</key> | |
7414 <val>[ unit(' s ') ]</val> | |
7415 <type>unit</type> | |
7416 </param> | |
7417 <param> | |
7418 <key>YUNITS</key> | |
7419 <val>[ unit(' ') ]</val> | |
7420 <type>unit</type> | |
7421 </param> | |
7422 </plist> | |
7423 <plist name="none"> | |
7424 <param> | |
7425 <key>FSFCN</key> | |
7426 <val>f</val> | |
7427 <type>char</type> | |
7428 </param> | |
7429 <param> | |
7430 <key>F1</key> | |
7431 <val>1e-09</val> | |
7432 <type>double</type> | |
7433 </param> | |
7434 <param> | |
7435 <key>F2</key> | |
7436 <val>5</val> | |
7437 <type>double</type> | |
7438 </param> | |
7439 <param> | |
7440 <key>NF</key> | |
7441 <val>1000</val> | |
7442 <type>double</type> | |
7443 </param> | |
7444 <param> | |
7445 <key>SCALE</key> | |
7446 <val>log</val> | |
7447 <type>char</type> | |
7448 </param> | |
7449 <param> | |
7450 <key>F</key> | |
7451 <val>[]</val> | |
7452 <type>double</type> | |
7453 </param> | |
7454 <param> | |
7455 <key>XUNITS</key> | |
7456 <val>[ unit(' Hz ') ]</val> | |
7457 <type>unit</type> | |
7458 </param> | |
7459 <param> | |
7460 <key>YUNITS</key> | |
7461 <val>[ unit(' ') ]</val> | |
7462 <type>unit</type> | |
7463 </param> | |
7464 </plist> | |
7465 <plist name="none"> | |
7466 <param> | |
7467 <key>WIN</key> | |
7468 <val> specwin('Hanning', 100)</val> | |
7469 <type>specwin</type> | |
7470 </param> | |
7471 <param> | |
7472 <key>YUNITS</key> | |
7473 <val>[ unit(' ') ]</val> | |
7474 <type>unit</type> | |
7475 </param> | |
7476 </plist> | |
7477 <plist name="none"> | |
7478 <param> | |
7479 <key>WAVEFORM</key> | |
7480 <val>sawtooth</val> | |
7481 <type>char</type> | |
7482 </param> | |
7483 <param> | |
7484 <key>F</key> | |
7485 <val>0.2</val> | |
7486 <type>double</type> | |
7487 </param> | |
7488 <param> | |
7489 <key>FS</key> | |
7490 <val>10</val> | |
7491 <type>double</type> | |
7492 </param> | |
7493 <param> | |
7494 <key>NSECS</key> | |
7495 <val>100</val> | |
7496 <type>double</type> | |
7497 </param> | |
7498 <param> | |
7499 <key>XUNITS</key> | |
7500 <val>[ unit(' s ') ]</val> | |
7501 <type>unit</type> | |
7502 </param> | |
7503 <param> | |
7504 <key>YUNITS</key> | |
7505 <val>[ unit(' ') ]</val> | |
7506 <type>unit</type> | |
7507 </param> | |
7508 <param> | |
7509 <key>Width</key> | |
7510 <val>0.6</val> | |
7511 <type>Char</type> | |
7512 </param> | |
7513 </plist> | |
7514 <plist name="none"> | |
7515 <param> | |
7516 <key>POLYVAL</key> | |
7517 <val>[-0.0001 0.02 -1 -1]</val> | |
7518 <type>double</type> | |
7519 </param> | |
7520 <param> | |
7521 <key>NSECS</key> | |
7522 <val>10</val> | |
7523 <type>double</type> | |
7524 </param> | |
7525 <param> | |
7526 <key>FS</key> | |
7527 <val>10</val> | |
7528 <type>double</type> | |
7529 </param> | |
7530 <param> | |
7531 <key>T</key> | |
7532 <val>[]</val> | |
7533 <type>double</type> | |
7534 </param> | |
7535 <param> | |
7536 <key>XUNITS</key> | |
7537 <val>[ unit(' s ') ]</val> | |
7538 <type>unit</type> | |
7539 </param> | |
7540 <param> | |
7541 <key>YUNITS</key> | |
7542 <val>[ unit(' ') ]</val> | |
7543 <type>unit</type> | |
7544 </param> | |
7545 </plist> | |
7546 <plist name="none"> | |
7547 <param> | |
7548 <key>HOSTNAME</key> | |
7549 <val>localhost</val> | |
7550 <type>char</type> | |
7551 </param> | |
7552 <param> | |
7553 <key>DATABASE</key> | |
7554 <val>ltpda</val> | |
7555 <type>char</type> | |
7556 </param> | |
7557 <param> | |
7558 <key>ID</key> | |
7559 <val>[]</val> | |
7560 <type>double</type> | |
7561 </param> | |
7562 <param> | |
7563 <key>BINARY</key> | |
7564 <val>no</val> | |
7565 <type>char</type> | |
7566 </param> | |
7567 </plist> | |
7568 <plist name="none"> | |
7569 <param> | |
7570 <key>PLIST</key> | |
7571 <val>(empty-plist)</val> | |
7572 <type>plist</type> | |
7573 </param> | |
7574 </plist> | |
7575 <plist name="none"> | |
7576 <param> | |
7577 <key>PZMODEL</key> | |
7578 <val>pzmodel(none)</val> | |
7579 <type>pzmodel</type> | |
7580 </param> | |
7581 <param> | |
7582 <key>NSECS</key> | |
7583 <val>0</val> | |
7584 <type>double</type> | |
7585 </param> | |
7586 <param> | |
7587 <key>FS</key> | |
7588 <val>0</val> | |
7589 <type>double</type> | |
7590 </param> | |
7591 <param> | |
7592 <key>XUNITS</key> | |
7593 <val>[ unit(' s ') ]</val> | |
7594 <type>unit</type> | |
7595 </param> | |
7596 <param> | |
7597 <key>YUNITS</key> | |
7598 <val>[ unit(' ') ]</val> | |
7599 <type>unit</type> | |
7600 </param> | |
7601 </plist> | |
7602 <plist name="none"> | |
7603 <param> | |
7604 <key>MODEL</key> | |
7605 <val/> | |
7606 <type>char</type> | |
7607 </param> | |
7608 </plist> | |
7609 </plists> | |
7610 </LTPDAalgorithm> | |
7611 <plist name="none"> | |
7612 <param> | |
7613 <key>WAVEFORM</key> | |
7614 <val>sawtooth</val> | |
7615 <type>char</type> | |
7616 </param> | |
7617 <param> | |
7618 <key>F</key> | |
7619 <val>0.2</val> | |
7620 <type>double</type> | |
7621 </param> | |
7622 <param> | |
7623 <key>FS</key> | |
7624 <val>10</val> | |
7625 <type>double</type> | |
7626 </param> | |
7627 <param> | |
7628 <key>NSECS</key> | |
7629 <val>100</val> | |
7630 <type>double</type> | |
7631 </param> | |
7632 <param> | |
7633 <key>XUNITS</key> | |
7634 <val>[ unit(' s ') ]</val> | |
7635 <type>unit</type> | |
7636 </param> | |
7637 <param> | |
7638 <key>YUNITS</key> | |
7639 <val>[ unit(' ') ]</val> | |
7640 <type>unit</type> | |
7641 </param> | |
7642 <param> | |
7643 <key>Width</key> | |
7644 <val>0.6</val> | |
7645 <type>Char</type> | |
7646 </param> | |
7647 </plist> | |
7648 <port number="0" terminal="" type="output"> | |
7649 <node> | |
7650 <pipe color="-3657166" dstblock="saw" dstport="0" srcblock="a1" thickness="2.5"/> | |
7651 </node> | |
7652 </port> | |
7653 </block> | |
7654 <block bounds="58 96 55 63" inputs="1" name="amp" outputs="1"> | |
7655 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
7656 <HelpText> AO analysis object class constructor. | |
7657 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
7658 | |
7659 DESCRIPTION: AO analysis object class constructor. | |
7660 Create an analysis object. | |
7661 | |
7662 Possible constructors: | |
7663 | |
7664 a = ao() - creates an empty analysis object | |
7665 a = ao('a1.xml') - creates a new analysis object by loading the | |
7666 analysis object from disk. | |
7667 a = ao('a1.mat') - creates a new analysis object by loading the | |
7668 analysis object from disk. | |
7669 a = ao('a1.mat') - creates a new analysis object by loading the | |
7670 2-column data set stored in the .MAT file. | |
7671 a = ao('file.txt') - creates a new analysis object by loading the | |
7672 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
7673 to be an equally sampled two-column file of | |
7674 time and amplitude. By default, the amplitude | |
7675 units are taken to be Volts ('V') and the | |
7676 time samples are assumed to be in seconds. | |
7677 a = ao('file',pl) - creates a new analysis object by loading the | |
7678 data in 'file'. The parameter list decide how the | |
7679 analysis object is created. The valid key values | |
7680 of the parameter list are: | |
7681 'type' 'tsdata','fsdata','xydata' | |
7682 [default: 'tsdata'] | |
7683 'use_fs' if this value is set, the | |
7684 x-axes is computed by the fs value. | |
7685 [default: empty array] | |
7686 'columns' [1 2 1 4] | |
7687 Each pair represented the x- and y-axes. | |
7688 (Each column pair creates an analysis object) | |
7689 Is the value 'use_fs' is used then | |
7690 represent each column the y-axes. | |
7691 (Each column creates an analysis object) | |
7692 [default: [1 2] ] | |
7693 'comment_char' The comment character in the file | |
7694 [default: ''] | |
7695 'description' To set the description in the analysis object | |
7696 '...' every property where exist a public | |
7697 set-function in the AO class e.g. | |
7698 setName, setT0, setYunits, ... | |
7699 If the constructor creates multiple ao's it is | |
7700 possible to give each data class its own e.g. | |
7701 'name'. In this case the parameter list with the | |
7702 key 'name' must have cell of the different values | |
7703 as the name of the different data objects. e.g. | |
7704 pl = plist('columns', [1 2 1 3], ... | |
7705 'name', {'name1' 'name2'}, ... | |
7706 'xunits', unit('s'), ... | |
7707 'yunits', {unit('V') unit('Hz'})); | |
7708 This parameter list creates two ao's with tsdata. | |
7709 | |
7710 'Robust' - set this to 'yes' to use (slow) | |
7711 robust data reading. Useful for | |
7712 complicated file formats. | |
7713 [default: 'yes'] | |
7714 | |
7715 NOTE: Data files with comments at the end of the lines can only be | |
7716 read if there are no lines with only comments. In this case, do not | |
7717 specify a comment character. If you really want to load a file like | |
7718 this, specify the 'Robust' option; this will be very slow for large | |
7719 files. | |
7720 | |
7721 a = ao(data) - creates an analysis object with a data | |
7722 object. Data object can be one of tsdata, | |
7723 fsdata, cdata, xydata, xyzdata. | |
7724 a = ao(data, hist) - creates an analysis object with a data | |
7725 object and a history object | |
7726 a = ao(specwin) - creates an analysis object from a specwin | |
7727 object | |
7728 a = ao(plist) - creates an analysis object from the description | |
7729 given in the parameter list | |
7730 | |
7731 Parameter sets for plist constructor (in order of priority): | |
7732 | |
7733 From XML File | |
7734 ------------- | |
7735 | |
7736 Construct an AO by loading it from an XML file. | |
7737 | |
7738 'filename' - construct an AO from a filename. | |
7739 Example: plist('filename', 'a1.xml') | |
7740 [default: empty string] | |
7741 | |
7742 From MAT File | |
7743 ------------- | |
7744 | |
7745 Construct an AO by loading it from a MAT file. | |
7746 | |
7747 'filename' - construct an AO from a filename. | |
7748 Example: plist('filename', 'a1.mat') | |
7749 [default: empty string] | |
7750 | |
7751 From ASCII File | |
7752 --------------- | |
7753 | |
7754 Construct an AO by loading it from an ASCII text file. | |
7755 | |
7756 'filename' - construct an AO from a filename. | |
7757 Example: plist('filename', 'a1.txt') | |
7758 [default: empty string] | |
7759 | |
7760 For additional parameters, see constructor ao(file, pl) above. | |
7761 | |
7762 From Function | |
7763 ------------- | |
7764 | |
7765 Construct an AO from the description of any valid MATLAB function. | |
7766 | |
7767 'fcn' - any valid MATLAB function. | |
7768 Example: plist('fcn', 'randn(100,1)') | |
7769 | |
7770 You can pass additional parameters to the fcn as extra | |
7771 parameters in the parameter list: | |
7772 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
7773 | |
7774 ** Note: case is ignored in the function specification | |
7775 such the following: | |
7776 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
7777 results in: | |
7778 2*2*[1:20] | |
7779 | |
7780 [default: 'randn(100,1)'] | |
7781 | |
7782 From Values | |
7783 ----------- | |
7784 | |
7785 Construct an AO from a set of values. | |
7786 | |
7787 'vals' - a set of values. | |
7788 Example: plist('vals', [1 2 3]) | |
7789 optional parameter: repeat 'N' times | |
7790 Example: plist('vals', [1 2 3], 'N', 10) | |
7791 | |
7792 [default: vals: [1], N: [1] ] | |
7793 OR | |
7794 | |
7795 To produce a tsdata AO | |
7796 | |
7797 'xvals' - a set of x values. | |
7798 'yvals' - a set of y values. | |
7799 | |
7800 | |
7801 | |
7802 From Time-series Function | |
7803 ------------------------- | |
7804 | |
7805 Construct an AO from a function of time, t. | |
7806 | |
7807 'tsfcn' - a function of time. | |
7808 | |
7809 You can also specify optional parameters | |
7810 'fs' - sampling frequency [default: 10 Hz] | |
7811 'nsecs' - length in seconds [default: 10 s] | |
7812 | |
7813 You can also specify the initial time (t0) associated with | |
7814 the time-series by passing a parameter 't0' with a value | |
7815 that is a time object [default: time(0)] | |
7816 Example: | |
7817 plist('fs', 10, 'nsecs', 10, ... | |
7818 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
7819 't0', time('1980-12-01 12:43:12')); | |
7820 | |
7821 From Frequency-series Function | |
7822 ------------------------------ | |
7823 | |
7824 Construct an AO from a function of frequency, f. | |
7825 | |
7826 'fsfcn' - a function of frequency, f. [default: 'f'] | |
7827 | |
7828 You can also specify optional parameters: | |
7829 'f1' - the initial frequency [default: 1e-9] | |
7830 'f2' - the final frequency [default: 5] | |
7831 'nf' - the number of frequency samples [default: 1000] | |
7832 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
7833 or provide a frequency vector: | |
7834 'f' - a vector of frequencies on which to evaluate the | |
7835 function [default: [] ] | |
7836 | |
7837 From Window | |
7838 ----------- | |
7839 | |
7840 Construct an AO from a spectral window object. | |
7841 | |
7842 'win' - A specwin object. | |
7843 | |
7844 This creates a cdata type AO containing the window values. | |
7845 Example: plist('win', specwin('Hannning', 100)) | |
7846 | |
7847 [default: specwin('Hanning', 100)] | |
7848 | |
7849 From Waveform | |
7850 ------------- | |
7851 | |
7852 Construct an AO from a waveform description. | |
7853 | |
7854 'waveform' - a waveform description (see options below). | |
7855 | |
7856 You can also specify additional parameters: | |
7857 'fs' - sampling frequency [default: 10 Hz] | |
7858 'nsecs' - length in seconds [default: 10 s] | |
7859 't0' - time-stamp of the first data sample [default time(0)] | |
7860 | |
7861 and, for the following waveform types: | |
7862 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
7863 (can be vectors for sum of sine waves) | |
7864 'A' - Amplitude of the wave | |
7865 'f' - Frequency of the wave | |
7866 'phi' - Phase of the eave | |
7867 'nsecs' - Number of seconds (in seconds) | |
7868 'toff' - Offset of the wave (in seconds) | |
7869 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
7870 'sigma' specify the standard deviation | |
7871 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
7872 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
7873 'Square wave' - 'f', 'duty' (help square) | |
7874 'Sawtooth' - 'f', 'width' (help sawtooth) | |
7875 | |
7876 You can also specify the initial time (t0) associated with | |
7877 the time-series by passing a parameter 't0' with a value | |
7878 that is a time object. | |
7879 | |
7880 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
7881 fs: 10, nsecs: 10, t0: time(0) ] | |
7882 | |
7883 | |
7884 From Repository | |
7885 --------------- | |
7886 | |
7887 Construct an AO by retrieving it from an LTPDA repository. | |
7888 | |
7889 'Hostname' - the repository hostname. Only those objects which | |
7890 are AOs are returned. | |
7891 [default: 'localhost']; | |
7892 | |
7893 Additional parameters: | |
7894 | |
7895 'Database' - The database name [default: 'ltpda'] | |
7896 'ID' - A vector of object IDs. [default: []] | |
7897 'CID' - Retrieve all AO objects from a particular | |
7898 collection. | |
7899 'Binary' - Set to 'yes' to retrieve from stored binary | |
7900 representation (not always available). | |
7901 | |
7902 From Polynomial | |
7903 --------------- | |
7904 | |
7905 Construct an AO from a set of polynomial coefficients. | |
7906 | |
7907 'polyval' - a set of polynomial coefficients. | |
7908 [default: [-0.0001 0.02 -1 -1] ] | |
7909 | |
7910 Additional parameters: | |
7911 'Nsecs' and 'fs' - number of seconds, and sample rate | |
7912 [defaults: nsecs: 10, fs: 10] | |
7913 or 't' - vector of time vertices | |
7914 [default: [] ] | |
7915 | |
7916 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
7917 | |
7918 | |
7919 From Pzmodel | |
7920 ------------ | |
7921 | |
7922 Generates an ao with a timeseries with a prescribed spectrum. | |
7923 p = [pz(f1,q1) pz(f2,q2)] | |
7924 z = [pz(f3,q3)] | |
7925 pzm = pzmodel(gain, p, z) | |
7926 The constructor also needs: fs - sampling frequency | |
7927 nsecs - number of seconds to be generated | |
7928 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
7929 | |
7930 From Model | |
7931 ---------- | |
7932 | |
7933 A collection of built-in models which construct data series and return | |
7934 them in AOs. | |
7935 | |
7936 'Model' - give the model name. To get a list of models: | |
7937 ao(plist('Model', '')) | |
7938 | |
7939 Each model has additional parameters that need to be passed. To see the | |
7940 parameters: | |
7941 >> help ao.<model_name> | |
7942 | |
7943 for example, | |
7944 | |
7945 >> help ao.mdc1_fd_dynamics | |
7946 | |
7947 From Plist | |
7948 ---------- | |
7949 | |
7950 'Plist' - construct from a plist. The value passed should be a plist | |
7951 object. | |
7952 [default: empty plist] | |
7953 | |
7954 | |
7955 | |
7956 Examples: | |
7957 | |
7958 1) Normally distributed random noise time-series | |
7959 | |
7960 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
7961 rd10 = ao(p); | |
7962 | |
7963 | |
7964 Indexing: | |
7965 b = a(1) % where a is an array of analysis objects | |
7966 d = a.data; % get the data object | |
7967 h = a.hist; % get the history object | |
7968 d = a.data.x(1:20); % get a matrix of data values x; | |
7969 | |
7970 2) Timeseries with a prescribed spectrum | |
7971 | |
7972 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
7973 a = ao(p) | |
7974 | |
7975 fs - sampling frequency | |
7976 nsecs - number of seconds in time series | |
7977 ndigits - number of digits for symbolic math toolbox (default: 32) | |
7978 | |
7979 | |
7980 From pzmodel | |
7981 ------------ | |
7982 | |
7983 Generates an ao with a timeseries with a prescribed spectrum. | |
7984 p = [pz(f1,q1) pz(f2,q2)] | |
7985 z = [pz(f3,q3)] | |
7986 pzm = pzmodel(gain, p, z) | |
7987 The constructor also needs: fs - sampling frequency | |
7988 nsecs - number of seconds to be generated | |
7989 a = ao(pzm, nsecs, fs) | |
7990 | |
7991 The following call returns an minfo object that contains information | |
7992 about the AO constructor: | |
7993 | |
7994 >> info = ao.getInfo | |
7995 | |
7996 You can get information about class methods by calling: | |
7997 | |
7998 >> info = ao.getInfo(method) | |
7999 | |
8000 e.g. info = ao.getInfo('psd') | |
8001 | |
8002 You can also restrict the sets of parameters contained in the minfo | |
8003 object by calling: | |
8004 | |
8005 >> info = ao.getInfo(method, set) | |
8006 | |
8007 e.g., info = ao.getInfo('ao', 'From Vals') | |
8008 | |
8009 See also tsdata, fsdata, xydata, cdata, xyzdata | |
8010 | |
8011 M Hewitson 30-01-07 | |
8012 | |
8013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
8014 </HelpText> | |
8015 <sets> | |
8016 <set name="Default"/> | |
8017 <set name="From XML File"/> | |
8018 <set name="From MAT File"/> | |
8019 <set name="From ASCII File"/> | |
8020 <set name="From Function"/> | |
8021 <set name="From Values"/> | |
8022 <set name="From Time-series Function"/> | |
8023 <set name="From Frequency-series Function"/> | |
8024 <set name="From Window"/> | |
8025 <set name="From Waveform"/> | |
8026 <set name="From Polynomial"/> | |
8027 <set name="From Repository"/> | |
8028 <set name="From Plist"/> | |
8029 <set name="From Pzmodel"/> | |
8030 <set name="From Model"/> | |
8031 </sets> | |
8032 <plists> | |
8033 <plist name="none"/> | |
8034 <plist name="none"> | |
8035 <param> | |
8036 <key>FILENAME</key> | |
8037 <val/> | |
8038 <type>char</type> | |
8039 </param> | |
8040 </plist> | |
8041 <plist name="none"> | |
8042 <param> | |
8043 <key>FILENAME</key> | |
8044 <val/> | |
8045 <type>char</type> | |
8046 </param> | |
8047 </plist> | |
8048 <plist name="none"> | |
8049 <param> | |
8050 <key>FILENAME</key> | |
8051 <val/> | |
8052 <type>char</type> | |
8053 </param> | |
8054 <param> | |
8055 <key>TYPE</key> | |
8056 <val>tsdata</val> | |
8057 <type>char</type> | |
8058 </param> | |
8059 <param> | |
8060 <key>COLUMNS</key> | |
8061 <val>[1 2]</val> | |
8062 <type>double</type> | |
8063 </param> | |
8064 <param> | |
8065 <key>XUNITS</key> | |
8066 <val>[ unit(' s ') ]</val> | |
8067 <type>unit</type> | |
8068 </param> | |
8069 <param> | |
8070 <key>YUNITS</key> | |
8071 <val>[ unit(' ') ]</val> | |
8072 <type>unit</type> | |
8073 </param> | |
8074 <param> | |
8075 <key>T0</key> | |
8076 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
8077 <type>time</type> | |
8078 </param> | |
8079 <param> | |
8080 <key>COMMENT_CHAR</key> | |
8081 <val/> | |
8082 <type>char</type> | |
8083 </param> | |
8084 <param> | |
8085 <key>USE_FS</key> | |
8086 <val/> | |
8087 <type>char</type> | |
8088 </param> | |
8089 <param> | |
8090 <key>ROBUST</key> | |
8091 <val>yes</val> | |
8092 <type>char</type> | |
8093 </param> | |
8094 </plist> | |
8095 <plist name="none"> | |
8096 <param> | |
8097 <key>FCN</key> | |
8098 <val>randn(100,1)</val> | |
8099 <type>char</type> | |
8100 </param> | |
8101 <param> | |
8102 <key>YUNITS</key> | |
8103 <val>[ unit(' ') ]</val> | |
8104 <type>unit</type> | |
8105 </param> | |
8106 </plist> | |
8107 <plist name="none"> | |
8108 <param> | |
8109 <key>VALS</key> | |
8110 <val>0.1</val> | |
8111 <type>double</type> | |
8112 </param> | |
8113 <param> | |
8114 <key>N</key> | |
8115 <val>1</val> | |
8116 <type>double</type> | |
8117 </param> | |
8118 <param> | |
8119 <key>DTYPE</key> | |
8120 <val/> | |
8121 <type>char</type> | |
8122 </param> | |
8123 <param> | |
8124 <key>FS</key> | |
8125 <val>[]</val> | |
8126 <type>double</type> | |
8127 </param> | |
8128 <param> | |
8129 <key>XVALS</key> | |
8130 <val>[]</val> | |
8131 <type>double</type> | |
8132 </param> | |
8133 <param> | |
8134 <key>YVALS</key> | |
8135 <val>[]</val> | |
8136 <type>double</type> | |
8137 </param> | |
8138 <param> | |
8139 <key>YUNITS</key> | |
8140 <val/> | |
8141 <type>char</type> | |
8142 </param> | |
8143 </plist> | |
8144 <plist name="none"> | |
8145 <param> | |
8146 <key>TSFCN</key> | |
8147 <val>t</val> | |
8148 <type>char</type> | |
8149 </param> | |
8150 <param> | |
8151 <key>FS</key> | |
8152 <val>10</val> | |
8153 <type>double</type> | |
8154 </param> | |
8155 <param> | |
8156 <key>NSECS</key> | |
8157 <val>1</val> | |
8158 <type>double</type> | |
8159 </param> | |
8160 <param> | |
8161 <key>T0</key> | |
8162 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
8163 <type>time</type> | |
8164 </param> | |
8165 <param> | |
8166 <key>XUNITS</key> | |
8167 <val>[ unit(' s ') ]</val> | |
8168 <type>unit</type> | |
8169 </param> | |
8170 <param> | |
8171 <key>YUNITS</key> | |
8172 <val>[ unit(' ') ]</val> | |
8173 <type>unit</type> | |
8174 </param> | |
8175 </plist> | |
8176 <plist name="none"> | |
8177 <param> | |
8178 <key>FSFCN</key> | |
8179 <val>f</val> | |
8180 <type>char</type> | |
8181 </param> | |
8182 <param> | |
8183 <key>F1</key> | |
8184 <val>1e-09</val> | |
8185 <type>double</type> | |
8186 </param> | |
8187 <param> | |
8188 <key>F2</key> | |
8189 <val>5</val> | |
8190 <type>double</type> | |
8191 </param> | |
8192 <param> | |
8193 <key>NF</key> | |
8194 <val>1000</val> | |
8195 <type>double</type> | |
8196 </param> | |
8197 <param> | |
8198 <key>SCALE</key> | |
8199 <val>log</val> | |
8200 <type>char</type> | |
8201 </param> | |
8202 <param> | |
8203 <key>F</key> | |
8204 <val>[]</val> | |
8205 <type>double</type> | |
8206 </param> | |
8207 <param> | |
8208 <key>XUNITS</key> | |
8209 <val>[ unit(' Hz ') ]</val> | |
8210 <type>unit</type> | |
8211 </param> | |
8212 <param> | |
8213 <key>YUNITS</key> | |
8214 <val>[ unit(' ') ]</val> | |
8215 <type>unit</type> | |
8216 </param> | |
8217 </plist> | |
8218 <plist name="none"> | |
8219 <param> | |
8220 <key>WIN</key> | |
8221 <val> specwin('Hanning', 100)</val> | |
8222 <type>specwin</type> | |
8223 </param> | |
8224 <param> | |
8225 <key>YUNITS</key> | |
8226 <val>[ unit(' ') ]</val> | |
8227 <type>unit</type> | |
8228 </param> | |
8229 </plist> | |
8230 <plist name="none"> | |
8231 <param> | |
8232 <key>WAVEFORM</key> | |
8233 <val>sine wave</val> | |
8234 <type>char</type> | |
8235 </param> | |
8236 <param> | |
8237 <key>A</key> | |
8238 <val>1</val> | |
8239 <type>double</type> | |
8240 </param> | |
8241 <param> | |
8242 <key>F</key> | |
8243 <val>1.23</val> | |
8244 <type>double</type> | |
8245 </param> | |
8246 <param> | |
8247 <key>PHI</key> | |
8248 <val>0</val> | |
8249 <type>double</type> | |
8250 </param> | |
8251 <param> | |
8252 <key>FS</key> | |
8253 <val>10</val> | |
8254 <type>double</type> | |
8255 </param> | |
8256 <param> | |
8257 <key>NSECS</key> | |
8258 <val>10</val> | |
8259 <type>double</type> | |
8260 </param> | |
8261 <param> | |
8262 <key>T0</key> | |
8263 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
8264 <type>time</type> | |
8265 </param> | |
8266 <param> | |
8267 <key>TOFF</key> | |
8268 <val>0</val> | |
8269 <type>double</type> | |
8270 </param> | |
8271 <param> | |
8272 <key>XUNITS</key> | |
8273 <val>[ unit(' s ') ]</val> | |
8274 <type>unit</type> | |
8275 </param> | |
8276 <param> | |
8277 <key>YUNITS</key> | |
8278 <val>[ unit(' ') ]</val> | |
8279 <type>unit</type> | |
8280 </param> | |
8281 </plist> | |
8282 <plist name="none"> | |
8283 <param> | |
8284 <key>POLYVAL</key> | |
8285 <val>[-0.0001 0.02 -1 -1]</val> | |
8286 <type>double</type> | |
8287 </param> | |
8288 <param> | |
8289 <key>NSECS</key> | |
8290 <val>10</val> | |
8291 <type>double</type> | |
8292 </param> | |
8293 <param> | |
8294 <key>FS</key> | |
8295 <val>10</val> | |
8296 <type>double</type> | |
8297 </param> | |
8298 <param> | |
8299 <key>T</key> | |
8300 <val>[]</val> | |
8301 <type>double</type> | |
8302 </param> | |
8303 <param> | |
8304 <key>XUNITS</key> | |
8305 <val>[ unit(' s ') ]</val> | |
8306 <type>unit</type> | |
8307 </param> | |
8308 <param> | |
8309 <key>YUNITS</key> | |
8310 <val>[ unit(' ') ]</val> | |
8311 <type>unit</type> | |
8312 </param> | |
8313 </plist> | |
8314 <plist name="none"> | |
8315 <param> | |
8316 <key>HOSTNAME</key> | |
8317 <val>localhost</val> | |
8318 <type>char</type> | |
8319 </param> | |
8320 <param> | |
8321 <key>DATABASE</key> | |
8322 <val>ltpda</val> | |
8323 <type>char</type> | |
8324 </param> | |
8325 <param> | |
8326 <key>ID</key> | |
8327 <val>[]</val> | |
8328 <type>double</type> | |
8329 </param> | |
8330 <param> | |
8331 <key>BINARY</key> | |
8332 <val>no</val> | |
8333 <type>char</type> | |
8334 </param> | |
8335 </plist> | |
8336 <plist name="none"> | |
8337 <param> | |
8338 <key>PLIST</key> | |
8339 <val>(empty-plist)</val> | |
8340 <type>plist</type> | |
8341 </param> | |
8342 </plist> | |
8343 <plist name="none"> | |
8344 <param> | |
8345 <key>PZMODEL</key> | |
8346 <val>pzmodel(none)</val> | |
8347 <type>pzmodel</type> | |
8348 </param> | |
8349 <param> | |
8350 <key>NSECS</key> | |
8351 <val>0</val> | |
8352 <type>double</type> | |
8353 </param> | |
8354 <param> | |
8355 <key>FS</key> | |
8356 <val>0</val> | |
8357 <type>double</type> | |
8358 </param> | |
8359 <param> | |
8360 <key>XUNITS</key> | |
8361 <val>[ unit(' s ') ]</val> | |
8362 <type>unit</type> | |
8363 </param> | |
8364 <param> | |
8365 <key>YUNITS</key> | |
8366 <val>[ unit(' ') ]</val> | |
8367 <type>unit</type> | |
8368 </param> | |
8369 </plist> | |
8370 <plist name="none"> | |
8371 <param> | |
8372 <key>MODEL</key> | |
8373 <val/> | |
8374 <type>char</type> | |
8375 </param> | |
8376 </plist> | |
8377 </plists> | |
8378 </LTPDAalgorithm> | |
8379 <plist name="none"> | |
8380 <param> | |
8381 <key>VALS</key> | |
8382 <val>0.1</val> | |
8383 <type>double</type> | |
8384 </param> | |
8385 <param> | |
8386 <key>N</key> | |
8387 <val>1</val> | |
8388 <type>double</type> | |
8389 </param> | |
8390 <param> | |
8391 <key>DTYPE</key> | |
8392 <val/> | |
8393 <type>char</type> | |
8394 </param> | |
8395 <param> | |
8396 <key>FS</key> | |
8397 <val>[]</val> | |
8398 <type>double</type> | |
8399 </param> | |
8400 <param> | |
8401 <key>XVALS</key> | |
8402 <val>[]</val> | |
8403 <type>double</type> | |
8404 </param> | |
8405 <param> | |
8406 <key>YVALS</key> | |
8407 <val>[]</val> | |
8408 <type>double</type> | |
8409 </param> | |
8410 <param> | |
8411 <key>YUNITS</key> | |
8412 <val/> | |
8413 <type>char</type> | |
8414 </param> | |
8415 </plist> | |
8416 <port number="0" terminal="" type="output"> | |
8417 <node> | |
8418 <pipe color="-3657166" dstblock="saw" dstport="1" srcblock="amp" thickness="2.5"/> | |
8419 </node> | |
8420 </port> | |
8421 </block> | |
8422 <block bounds="150 56 60 56" inputs="2" name="saw" outputs="1"> | |
8423 <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="times" mpackage="" mversion="" portdims="1 10 1 10"> | |
8424 <HelpText> TIMES implements times operator for analysis objects. | |
8425 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
8426 | |
8427 DESCRIPTION: TIMES implements times operator for analysis objects. | |
8428 | |
8429 CALL: a = a1.*scalar | |
8430 a = a1.*a2 | |
8431 | |
8432 M-FILE INFO: Get information about this methods by calling | |
8433 >> ao.getInfo('times') | |
8434 | |
8435 Get information about a specified set-plist by calling: | |
8436 >> ao.getInfo('times', 'None') | |
8437 | |
8438 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
8439 | |
8440 HISTORY: 01-02-07 M Hewitson | |
8441 Creation | |
8442 | |
8443 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
8444 </HelpText> | |
8445 <sets> | |
8446 <set name="Default"/> | |
8447 </sets> | |
8448 <plists> | |
8449 <plist name="none"/> | |
8450 </plists> | |
8451 </LTPDAalgorithm> | |
8452 <plist name="none"/> | |
8453 <port number="0" terminal="" type="output"> | |
8454 <node> | |
8455 <pipe color="-3657166" dstblock="nsaw" dstport="0" srcblock="saw" thickness="2.5"/> | |
8456 </node> | |
8457 </port> | |
8458 </block> | |
8459 <block bounds="61 174 54 61" inputs="1" name="noise" outputs="1"> | |
8460 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
8461 <HelpText> AO analysis object class constructor. | |
8462 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
8463 | |
8464 DESCRIPTION: AO analysis object class constructor. | |
8465 Create an analysis object. | |
8466 | |
8467 Possible constructors: | |
8468 | |
8469 a = ao() - creates an empty analysis object | |
8470 a = ao('a1.xml') - creates a new analysis object by loading the | |
8471 analysis object from disk. | |
8472 a = ao('a1.mat') - creates a new analysis object by loading the | |
8473 analysis object from disk. | |
8474 a = ao('a1.mat') - creates a new analysis object by loading the | |
8475 2-column data set stored in the .MAT file. | |
8476 a = ao('file.txt') - creates a new analysis object by loading the | |
8477 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
8478 to be an equally sampled two-column file of | |
8479 time and amplitude. By default, the amplitude | |
8480 units are taken to be Volts ('V') and the | |
8481 time samples are assumed to be in seconds. | |
8482 a = ao('file',pl) - creates a new analysis object by loading the | |
8483 data in 'file'. The parameter list decide how the | |
8484 analysis object is created. The valid key values | |
8485 of the parameter list are: | |
8486 'type' 'tsdata','fsdata','xydata' | |
8487 [default: 'tsdata'] | |
8488 'use_fs' if this value is set, the | |
8489 x-axes is computed by the fs value. | |
8490 [default: empty array] | |
8491 'columns' [1 2 1 4] | |
8492 Each pair represented the x- and y-axes. | |
8493 (Each column pair creates an analysis object) | |
8494 Is the value 'use_fs' is used then | |
8495 represent each column the y-axes. | |
8496 (Each column creates an analysis object) | |
8497 [default: [1 2] ] | |
8498 'comment_char' The comment character in the file | |
8499 [default: ''] | |
8500 'description' To set the description in the analysis object | |
8501 '...' every property where exist a public | |
8502 set-function in the AO class e.g. | |
8503 setName, setT0, setYunits, ... | |
8504 If the constructor creates multiple ao's it is | |
8505 possible to give each data class its own e.g. | |
8506 'name'. In this case the parameter list with the | |
8507 key 'name' must have cell of the different values | |
8508 as the name of the different data objects. e.g. | |
8509 pl = plist('columns', [1 2 1 3], ... | |
8510 'name', {'name1' 'name2'}, ... | |
8511 'xunits', unit('s'), ... | |
8512 'yunits', {unit('V') unit('Hz'})); | |
8513 This parameter list creates two ao's with tsdata. | |
8514 | |
8515 'Robust' - set this to 'yes' to use (slow) | |
8516 robust data reading. Useful for | |
8517 complicated file formats. | |
8518 [default: 'yes'] | |
8519 | |
8520 NOTE: Data files with comments at the end of the lines can only be | |
8521 read if there are no lines with only comments. In this case, do not | |
8522 specify a comment character. If you really want to load a file like | |
8523 this, specify the 'Robust' option; this will be very slow for large | |
8524 files. | |
8525 | |
8526 a = ao(data) - creates an analysis object with a data | |
8527 object. Data object can be one of tsdata, | |
8528 fsdata, cdata, xydata, xyzdata. | |
8529 a = ao(data, hist) - creates an analysis object with a data | |
8530 object and a history object | |
8531 a = ao(specwin) - creates an analysis object from a specwin | |
8532 object | |
8533 a = ao(plist) - creates an analysis object from the description | |
8534 given in the parameter list | |
8535 | |
8536 Parameter sets for plist constructor (in order of priority): | |
8537 | |
8538 From XML File | |
8539 ------------- | |
8540 | |
8541 Construct an AO by loading it from an XML file. | |
8542 | |
8543 'filename' - construct an AO from a filename. | |
8544 Example: plist('filename', 'a1.xml') | |
8545 [default: empty string] | |
8546 | |
8547 From MAT File | |
8548 ------------- | |
8549 | |
8550 Construct an AO by loading it from a MAT file. | |
8551 | |
8552 'filename' - construct an AO from a filename. | |
8553 Example: plist('filename', 'a1.mat') | |
8554 [default: empty string] | |
8555 | |
8556 From ASCII File | |
8557 --------------- | |
8558 | |
8559 Construct an AO by loading it from an ASCII text file. | |
8560 | |
8561 'filename' - construct an AO from a filename. | |
8562 Example: plist('filename', 'a1.txt') | |
8563 [default: empty string] | |
8564 | |
8565 For additional parameters, see constructor ao(file, pl) above. | |
8566 | |
8567 From Function | |
8568 ------------- | |
8569 | |
8570 Construct an AO from the description of any valid MATLAB function. | |
8571 | |
8572 'fcn' - any valid MATLAB function. | |
8573 Example: plist('fcn', 'randn(100,1)') | |
8574 | |
8575 You can pass additional parameters to the fcn as extra | |
8576 parameters in the parameter list: | |
8577 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
8578 | |
8579 ** Note: case is ignored in the function specification | |
8580 such the following: | |
8581 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
8582 results in: | |
8583 2*2*[1:20] | |
8584 | |
8585 [default: 'randn(100,1)'] | |
8586 | |
8587 From Values | |
8588 ----------- | |
8589 | |
8590 Construct an AO from a set of values. | |
8591 | |
8592 'vals' - a set of values. | |
8593 Example: plist('vals', [1 2 3]) | |
8594 optional parameter: repeat 'N' times | |
8595 Example: plist('vals', [1 2 3], 'N', 10) | |
8596 | |
8597 [default: vals: [1], N: [1] ] | |
8598 OR | |
8599 | |
8600 To produce a tsdata AO | |
8601 | |
8602 'xvals' - a set of x values. | |
8603 'yvals' - a set of y values. | |
8604 | |
8605 | |
8606 | |
8607 From Time-series Function | |
8608 ------------------------- | |
8609 | |
8610 Construct an AO from a function of time, t. | |
8611 | |
8612 'tsfcn' - a function of time. | |
8613 | |
8614 You can also specify optional parameters | |
8615 'fs' - sampling frequency [default: 10 Hz] | |
8616 'nsecs' - length in seconds [default: 10 s] | |
8617 | |
8618 You can also specify the initial time (t0) associated with | |
8619 the time-series by passing a parameter 't0' with a value | |
8620 that is a time object [default: time(0)] | |
8621 Example: | |
8622 plist('fs', 10, 'nsecs', 10, ... | |
8623 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
8624 't0', time('1980-12-01 12:43:12')); | |
8625 | |
8626 From Frequency-series Function | |
8627 ------------------------------ | |
8628 | |
8629 Construct an AO from a function of frequency, f. | |
8630 | |
8631 'fsfcn' - a function of frequency, f. [default: 'f'] | |
8632 | |
8633 You can also specify optional parameters: | |
8634 'f1' - the initial frequency [default: 1e-9] | |
8635 'f2' - the final frequency [default: 5] | |
8636 'nf' - the number of frequency samples [default: 1000] | |
8637 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
8638 or provide a frequency vector: | |
8639 'f' - a vector of frequencies on which to evaluate the | |
8640 function [default: [] ] | |
8641 | |
8642 From Window | |
8643 ----------- | |
8644 | |
8645 Construct an AO from a spectral window object. | |
8646 | |
8647 'win' - A specwin object. | |
8648 | |
8649 This creates a cdata type AO containing the window values. | |
8650 Example: plist('win', specwin('Hannning', 100)) | |
8651 | |
8652 [default: specwin('Hanning', 100)] | |
8653 | |
8654 From Waveform | |
8655 ------------- | |
8656 | |
8657 Construct an AO from a waveform description. | |
8658 | |
8659 'waveform' - a waveform description (see options below). | |
8660 | |
8661 You can also specify additional parameters: | |
8662 'fs' - sampling frequency [default: 10 Hz] | |
8663 'nsecs' - length in seconds [default: 10 s] | |
8664 't0' - time-stamp of the first data sample [default time(0)] | |
8665 | |
8666 and, for the following waveform types: | |
8667 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
8668 (can be vectors for sum of sine waves) | |
8669 'A' - Amplitude of the wave | |
8670 'f' - Frequency of the wave | |
8671 'phi' - Phase of the eave | |
8672 'nsecs' - Number of seconds (in seconds) | |
8673 'toff' - Offset of the wave (in seconds) | |
8674 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
8675 'sigma' specify the standard deviation | |
8676 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
8677 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
8678 'Square wave' - 'f', 'duty' (help square) | |
8679 'Sawtooth' - 'f', 'width' (help sawtooth) | |
8680 | |
8681 You can also specify the initial time (t0) associated with | |
8682 the time-series by passing a parameter 't0' with a value | |
8683 that is a time object. | |
8684 | |
8685 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
8686 fs: 10, nsecs: 10, t0: time(0) ] | |
8687 | |
8688 | |
8689 From Repository | |
8690 --------------- | |
8691 | |
8692 Construct an AO by retrieving it from an LTPDA repository. | |
8693 | |
8694 'Hostname' - the repository hostname. Only those objects which | |
8695 are AOs are returned. | |
8696 [default: 'localhost']; | |
8697 | |
8698 Additional parameters: | |
8699 | |
8700 'Database' - The database name [default: 'ltpda'] | |
8701 'ID' - A vector of object IDs. [default: []] | |
8702 'CID' - Retrieve all AO objects from a particular | |
8703 collection. | |
8704 'Binary' - Set to 'yes' to retrieve from stored binary | |
8705 representation (not always available). | |
8706 | |
8707 From Polynomial | |
8708 --------------- | |
8709 | |
8710 Construct an AO from a set of polynomial coefficients. | |
8711 | |
8712 'polyval' - a set of polynomial coefficients. | |
8713 [default: [-0.0001 0.02 -1 -1] ] | |
8714 | |
8715 Additional parameters: | |
8716 'Nsecs' and 'fs' - number of seconds, and sample rate | |
8717 [defaults: nsecs: 10, fs: 10] | |
8718 or 't' - vector of time vertices | |
8719 [default: [] ] | |
8720 | |
8721 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
8722 | |
8723 | |
8724 From Pzmodel | |
8725 ------------ | |
8726 | |
8727 Generates an ao with a timeseries with a prescribed spectrum. | |
8728 p = [pz(f1,q1) pz(f2,q2)] | |
8729 z = [pz(f3,q3)] | |
8730 pzm = pzmodel(gain, p, z) | |
8731 The constructor also needs: fs - sampling frequency | |
8732 nsecs - number of seconds to be generated | |
8733 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
8734 | |
8735 From Model | |
8736 ---------- | |
8737 | |
8738 A collection of built-in models which construct data series and return | |
8739 them in AOs. | |
8740 | |
8741 'Model' - give the model name. To get a list of models: | |
8742 ao(plist('Model', '')) | |
8743 | |
8744 Each model has additional parameters that need to be passed. To see the | |
8745 parameters: | |
8746 >> help ao.<model_name> | |
8747 | |
8748 for example, | |
8749 | |
8750 >> help ao.mdc1_fd_dynamics | |
8751 | |
8752 From Plist | |
8753 ---------- | |
8754 | |
8755 'Plist' - construct from a plist. The value passed should be a plist | |
8756 object. | |
8757 [default: empty plist] | |
8758 | |
8759 | |
8760 | |
8761 Examples: | |
8762 | |
8763 1) Normally distributed random noise time-series | |
8764 | |
8765 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
8766 rd10 = ao(p); | |
8767 | |
8768 | |
8769 Indexing: | |
8770 b = a(1) % where a is an array of analysis objects | |
8771 d = a.data; % get the data object | |
8772 h = a.hist; % get the history object | |
8773 d = a.data.x(1:20); % get a matrix of data values x; | |
8774 | |
8775 2) Timeseries with a prescribed spectrum | |
8776 | |
8777 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
8778 a = ao(p) | |
8779 | |
8780 fs - sampling frequency | |
8781 nsecs - number of seconds in time series | |
8782 ndigits - number of digits for symbolic math toolbox (default: 32) | |
8783 | |
8784 | |
8785 From pzmodel | |
8786 ------------ | |
8787 | |
8788 Generates an ao with a timeseries with a prescribed spectrum. | |
8789 p = [pz(f1,q1) pz(f2,q2)] | |
8790 z = [pz(f3,q3)] | |
8791 pzm = pzmodel(gain, p, z) | |
8792 The constructor also needs: fs - sampling frequency | |
8793 nsecs - number of seconds to be generated | |
8794 a = ao(pzm, nsecs, fs) | |
8795 | |
8796 The following call returns an minfo object that contains information | |
8797 about the AO constructor: | |
8798 | |
8799 >> info = ao.getInfo | |
8800 | |
8801 You can get information about class methods by calling: | |
8802 | |
8803 >> info = ao.getInfo(method) | |
8804 | |
8805 e.g. info = ao.getInfo('psd') | |
8806 | |
8807 You can also restrict the sets of parameters contained in the minfo | |
8808 object by calling: | |
8809 | |
8810 >> info = ao.getInfo(method, set) | |
8811 | |
8812 e.g., info = ao.getInfo('ao', 'From Vals') | |
8813 | |
8814 See also tsdata, fsdata, xydata, cdata, xyzdata | |
8815 | |
8816 M Hewitson 30-01-07 | |
8817 | |
8818 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
8819 </HelpText> | |
8820 <sets> | |
8821 <set name="Default"/> | |
8822 <set name="From XML File"/> | |
8823 <set name="From MAT File"/> | |
8824 <set name="From ASCII File"/> | |
8825 <set name="From Function"/> | |
8826 <set name="From Values"/> | |
8827 <set name="From Time-series Function"/> | |
8828 <set name="From Frequency-series Function"/> | |
8829 <set name="From Window"/> | |
8830 <set name="From Waveform"/> | |
8831 <set name="From Polynomial"/> | |
8832 <set name="From Repository"/> | |
8833 <set name="From Plist"/> | |
8834 <set name="From Pzmodel"/> | |
8835 <set name="From Model"/> | |
8836 </sets> | |
8837 <plists> | |
8838 <plist name="none"/> | |
8839 <plist name="none"> | |
8840 <param> | |
8841 <key>FILENAME</key> | |
8842 <val/> | |
8843 <type>char</type> | |
8844 </param> | |
8845 </plist> | |
8846 <plist name="none"> | |
8847 <param> | |
8848 <key>FILENAME</key> | |
8849 <val/> | |
8850 <type>char</type> | |
8851 </param> | |
8852 </plist> | |
8853 <plist name="none"> | |
8854 <param> | |
8855 <key>FILENAME</key> | |
8856 <val/> | |
8857 <type>char</type> | |
8858 </param> | |
8859 <param> | |
8860 <key>TYPE</key> | |
8861 <val>tsdata</val> | |
8862 <type>char</type> | |
8863 </param> | |
8864 <param> | |
8865 <key>COLUMNS</key> | |
8866 <val>[1 2]</val> | |
8867 <type>double</type> | |
8868 </param> | |
8869 <param> | |
8870 <key>XUNITS</key> | |
8871 <val>[ unit(' s ') ]</val> | |
8872 <type>unit</type> | |
8873 </param> | |
8874 <param> | |
8875 <key>YUNITS</key> | |
8876 <val>[ unit(' ') ]</val> | |
8877 <type>unit</type> | |
8878 </param> | |
8879 <param> | |
8880 <key>T0</key> | |
8881 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
8882 <type>time</type> | |
8883 </param> | |
8884 <param> | |
8885 <key>COMMENT_CHAR</key> | |
8886 <val/> | |
8887 <type>char</type> | |
8888 </param> | |
8889 <param> | |
8890 <key>USE_FS</key> | |
8891 <val/> | |
8892 <type>char</type> | |
8893 </param> | |
8894 <param> | |
8895 <key>ROBUST</key> | |
8896 <val>yes</val> | |
8897 <type>char</type> | |
8898 </param> | |
8899 </plist> | |
8900 <plist name="none"> | |
8901 <param> | |
8902 <key>FCN</key> | |
8903 <val>randn(100,1)</val> | |
8904 <type>char</type> | |
8905 </param> | |
8906 <param> | |
8907 <key>YUNITS</key> | |
8908 <val>[ unit(' ') ]</val> | |
8909 <type>unit</type> | |
8910 </param> | |
8911 </plist> | |
8912 <plist name="none"> | |
8913 <param> | |
8914 <key>VALS</key> | |
8915 <val>0.1</val> | |
8916 <type>double</type> | |
8917 </param> | |
8918 <param> | |
8919 <key>N</key> | |
8920 <val>1</val> | |
8921 <type>double</type> | |
8922 </param> | |
8923 <param> | |
8924 <key>DTYPE</key> | |
8925 <val/> | |
8926 <type>char</type> | |
8927 </param> | |
8928 <param> | |
8929 <key>FS</key> | |
8930 <val>[]</val> | |
8931 <type>double</type> | |
8932 </param> | |
8933 <param> | |
8934 <key>XVALS</key> | |
8935 <val>[]</val> | |
8936 <type>double</type> | |
8937 </param> | |
8938 <param> | |
8939 <key>YVALS</key> | |
8940 <val>[]</val> | |
8941 <type>double</type> | |
8942 </param> | |
8943 <param> | |
8944 <key>YUNITS</key> | |
8945 <val/> | |
8946 <type>char</type> | |
8947 </param> | |
8948 </plist> | |
8949 <plist name="none"> | |
8950 <param> | |
8951 <key>TSFCN</key> | |
8952 <val>0.01*randn(size(t))</val> | |
8953 <type>char</type> | |
8954 </param> | |
8955 <param> | |
8956 <key>FS</key> | |
8957 <val>10</val> | |
8958 <type>double</type> | |
8959 </param> | |
8960 <param> | |
8961 <key>NSECS</key> | |
8962 <val>100</val> | |
8963 <type>double</type> | |
8964 </param> | |
8965 <param> | |
8966 <key>T0</key> | |
8967 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
8968 <type>time</type> | |
8969 </param> | |
8970 <param> | |
8971 <key>XUNITS</key> | |
8972 <val>[ unit(' s ') ]</val> | |
8973 <type>unit</type> | |
8974 </param> | |
8975 <param> | |
8976 <key>YUNITS</key> | |
8977 <val>[ unit(' ') ]</val> | |
8978 <type>unit</type> | |
8979 </param> | |
8980 </plist> | |
8981 <plist name="none"> | |
8982 <param> | |
8983 <key>FSFCN</key> | |
8984 <val>f</val> | |
8985 <type>char</type> | |
8986 </param> | |
8987 <param> | |
8988 <key>F1</key> | |
8989 <val>1e-09</val> | |
8990 <type>double</type> | |
8991 </param> | |
8992 <param> | |
8993 <key>F2</key> | |
8994 <val>5</val> | |
8995 <type>double</type> | |
8996 </param> | |
8997 <param> | |
8998 <key>NF</key> | |
8999 <val>1000</val> | |
9000 <type>double</type> | |
9001 </param> | |
9002 <param> | |
9003 <key>SCALE</key> | |
9004 <val>log</val> | |
9005 <type>char</type> | |
9006 </param> | |
9007 <param> | |
9008 <key>F</key> | |
9009 <val>[]</val> | |
9010 <type>double</type> | |
9011 </param> | |
9012 <param> | |
9013 <key>XUNITS</key> | |
9014 <val>[ unit(' Hz ') ]</val> | |
9015 <type>unit</type> | |
9016 </param> | |
9017 <param> | |
9018 <key>YUNITS</key> | |
9019 <val>[ unit(' ') ]</val> | |
9020 <type>unit</type> | |
9021 </param> | |
9022 </plist> | |
9023 <plist name="none"> | |
9024 <param> | |
9025 <key>WIN</key> | |
9026 <val> specwin('Hanning', 100)</val> | |
9027 <type>specwin</type> | |
9028 </param> | |
9029 <param> | |
9030 <key>YUNITS</key> | |
9031 <val>[ unit(' ') ]</val> | |
9032 <type>unit</type> | |
9033 </param> | |
9034 </plist> | |
9035 <plist name="none"> | |
9036 <param> | |
9037 <key>WAVEFORM</key> | |
9038 <val>sine wave</val> | |
9039 <type>char</type> | |
9040 </param> | |
9041 <param> | |
9042 <key>A</key> | |
9043 <val>1</val> | |
9044 <type>double</type> | |
9045 </param> | |
9046 <param> | |
9047 <key>F</key> | |
9048 <val>1.23</val> | |
9049 <type>double</type> | |
9050 </param> | |
9051 <param> | |
9052 <key>PHI</key> | |
9053 <val>0</val> | |
9054 <type>double</type> | |
9055 </param> | |
9056 <param> | |
9057 <key>FS</key> | |
9058 <val>10</val> | |
9059 <type>double</type> | |
9060 </param> | |
9061 <param> | |
9062 <key>NSECS</key> | |
9063 <val>10</val> | |
9064 <type>double</type> | |
9065 </param> | |
9066 <param> | |
9067 <key>T0</key> | |
9068 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
9069 <type>time</type> | |
9070 </param> | |
9071 <param> | |
9072 <key>TOFF</key> | |
9073 <val>0</val> | |
9074 <type>double</type> | |
9075 </param> | |
9076 <param> | |
9077 <key>XUNITS</key> | |
9078 <val>[ unit(' s ') ]</val> | |
9079 <type>unit</type> | |
9080 </param> | |
9081 <param> | |
9082 <key>YUNITS</key> | |
9083 <val>[ unit(' ') ]</val> | |
9084 <type>unit</type> | |
9085 </param> | |
9086 </plist> | |
9087 <plist name="none"> | |
9088 <param> | |
9089 <key>POLYVAL</key> | |
9090 <val>[-0.0001 0.02 -1 -1]</val> | |
9091 <type>double</type> | |
9092 </param> | |
9093 <param> | |
9094 <key>NSECS</key> | |
9095 <val>10</val> | |
9096 <type>double</type> | |
9097 </param> | |
9098 <param> | |
9099 <key>FS</key> | |
9100 <val>10</val> | |
9101 <type>double</type> | |
9102 </param> | |
9103 <param> | |
9104 <key>T</key> | |
9105 <val>[]</val> | |
9106 <type>double</type> | |
9107 </param> | |
9108 <param> | |
9109 <key>XUNITS</key> | |
9110 <val>[ unit(' s ') ]</val> | |
9111 <type>unit</type> | |
9112 </param> | |
9113 <param> | |
9114 <key>YUNITS</key> | |
9115 <val>[ unit(' ') ]</val> | |
9116 <type>unit</type> | |
9117 </param> | |
9118 </plist> | |
9119 <plist name="none"> | |
9120 <param> | |
9121 <key>HOSTNAME</key> | |
9122 <val>localhost</val> | |
9123 <type>char</type> | |
9124 </param> | |
9125 <param> | |
9126 <key>DATABASE</key> | |
9127 <val>ltpda</val> | |
9128 <type>char</type> | |
9129 </param> | |
9130 <param> | |
9131 <key>ID</key> | |
9132 <val>[]</val> | |
9133 <type>double</type> | |
9134 </param> | |
9135 <param> | |
9136 <key>BINARY</key> | |
9137 <val>no</val> | |
9138 <type>char</type> | |
9139 </param> | |
9140 </plist> | |
9141 <plist name="none"> | |
9142 <param> | |
9143 <key>PLIST</key> | |
9144 <val>(empty-plist)</val> | |
9145 <type>plist</type> | |
9146 </param> | |
9147 </plist> | |
9148 <plist name="none"> | |
9149 <param> | |
9150 <key>PZMODEL</key> | |
9151 <val>pzmodel(none)</val> | |
9152 <type>pzmodel</type> | |
9153 </param> | |
9154 <param> | |
9155 <key>NSECS</key> | |
9156 <val>0</val> | |
9157 <type>double</type> | |
9158 </param> | |
9159 <param> | |
9160 <key>FS</key> | |
9161 <val>0</val> | |
9162 <type>double</type> | |
9163 </param> | |
9164 <param> | |
9165 <key>XUNITS</key> | |
9166 <val>[ unit(' s ') ]</val> | |
9167 <type>unit</type> | |
9168 </param> | |
9169 <param> | |
9170 <key>YUNITS</key> | |
9171 <val>[ unit(' ') ]</val> | |
9172 <type>unit</type> | |
9173 </param> | |
9174 </plist> | |
9175 <plist name="none"> | |
9176 <param> | |
9177 <key>MODEL</key> | |
9178 <val/> | |
9179 <type>char</type> | |
9180 </param> | |
9181 </plist> | |
9182 </plists> | |
9183 </LTPDAalgorithm> | |
9184 <plist name="none"> | |
9185 <param> | |
9186 <key>TSFCN</key> | |
9187 <val>0.01*randn(size(t))</val> | |
9188 <type>char</type> | |
9189 </param> | |
9190 <param> | |
9191 <key>FS</key> | |
9192 <val>10</val> | |
9193 <type>double</type> | |
9194 </param> | |
9195 <param> | |
9196 <key>NSECS</key> | |
9197 <val>100</val> | |
9198 <type>double</type> | |
9199 </param> | |
9200 <param> | |
9201 <key>T0</key> | |
9202 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
9203 <type>time</type> | |
9204 </param> | |
9205 <param> | |
9206 <key>XUNITS</key> | |
9207 <val>[ unit(' s ') ]</val> | |
9208 <type>unit</type> | |
9209 </param> | |
9210 <param> | |
9211 <key>YUNITS</key> | |
9212 <val>[ unit(' ') ]</val> | |
9213 <type>unit</type> | |
9214 </param> | |
9215 </plist> | |
9216 <port number="0" terminal="" type="output"> | |
9217 <node> | |
9218 <pipe color="-3657166" dstblock="nsaw" dstport="1" srcblock="noise" thickness="2.5"/> | |
9219 </node> | |
9220 </port> | |
9221 </block> | |
9222 <block bounds="220 119 59 50" inputs="2" name="nsaw" outputs="1"> | |
9223 <LTPDAalgorithm mcategory="Arithmetic Operator" mclass="ao" mname="plus" mpackage="" mversion="" portdims="1 10 1 10"> | |
9224 <HelpText> PLUS implements addition operator for analysis objects. | |
9225 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9226 | |
9227 DESCRIPTION: PLUS implements addition operator for two analysis objects. | |
9228 | |
9229 CALL: a = a1+scalar | |
9230 a = a1+a2 | |
9231 | |
9232 M-FILE INFO: Get information about this methods by calling | |
9233 >> ao.getInfo('plus') | |
9234 | |
9235 Get information about a specified set-plist by calling: | |
9236 >> ao.getInfo('plus', 'None') | |
9237 | |
9238 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
9239 | |
9240 HISTORY: 01-02-07 M Hewitson | |
9241 Creation | |
9242 | |
9243 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9244 </HelpText> | |
9245 <sets> | |
9246 <set name="Default"/> | |
9247 </sets> | |
9248 <plists> | |
9249 <plist name="none"/> | |
9250 </plists> | |
9251 </LTPDAalgorithm> | |
9252 <plist name="none"/> | |
9253 <port number="0" terminal="" type="output"> | |
9254 <node> | |
9255 <pipe color="-3657166" dstblock="fit" dstport="0" srcblock="nsaw" thickness="2.5"/> | |
9256 <pipe color="-3657166" dstblock="New Block" dstport="1" srcblock="nsaw" thickness="2.5"/> | |
9257 </node> | |
9258 </port> | |
9259 </block> | |
9260 <block bounds="325 92 79 50" inputs="1" name="fit" outputs="3"> | |
9261 <LTPDAalgorithm mcategory="Operator" mclass="ao" mname="curvefit" mpackage="" mversion="" portdims="1 10 1 10"> | |
9262 <HelpText> CURVEFIT fit a curve to data. | |
9263 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9264 | |
9265 DESCRIPTION: CURVEFIT fit a curve to data using lsqcurvefit. | |
9266 | |
9267 CALL: b = curvefit(a, pl) | |
9268 | |
9269 INPUTS: a - input AOs to fit to | |
9270 pl - parameter list (see below) | |
9271 | |
9272 OUTPUTs: b - analysis object containing the final fitted data. The | |
9273 parameter estimates as well as details of the fit are | |
9274 returned in the 'procinfo' field. See help on | |
9275 ltpda_fitChiSquare for details about returned values. | |
9276 | |
9277 PARAMETERS: | |
9278 'Function' - The function you want to fit. The function | |
9279 should be parameterized by the vector of | |
9280 parameters P and the x-vector Xdata, . | |
9281 'P0' - Initial parameter estimates. | |
9282 'LB' - Lower bounds for the parameters P. | |
9283 [default: -inf for each parameter]; | |
9284 'UB' - Upper bounds for the parameters P. | |
9285 [default: +inf for each parameter]; | |
9286 'AddP' - A cell-array of additional parameters to pass | |
9287 to the target function. | |
9288 'OPTSET' - You can pass additional options to lsqcurvefit | |
9289 as a cell-array of options. | |
9290 ('help lsqcurvefit' for options) | |
9291 ('help ltpda_fitChiSquare' for further options) | |
9292 'YERR' - Specify the error on the y-values of the data. | |
9293 You can give either a single value for all data | |
9294 points, or a vector of errors the same length | |
9295 as the data. The values can also be given as an | |
9296 AO. Specify an error AO for each input AO, or a | |
9297 cell-array of error vectors/values. | |
9298 'XERR' - Specify the error on the x-values of the data. | |
9299 You can give either a single value for all data | |
9300 points, or a vector of errors the same length | |
9301 as the data. The values can also be given as an | |
9302 AO. Specify an error AO for each input AO, or a | |
9303 cell-array of error vectors/values. | |
9304 'Plot' - Plot fit result: 'on' or 'off' [default] | |
9305 'FitFuncReturn' - Choose a function to apply to the output of the | |
9306 target function if the data are complex. | |
9307 [default: 'abs'] | |
9308 'No Fit' - true or false, fit or not [default: false] | |
9309 'FitIndex' - A boolean vector to specify whether or not to | |
9310 fit a particular parameter. | |
9311 [default: true(size(P0))] | |
9312 'FitUncertainty' - Fit parameter uncertainties or not. | |
9313 [default: true] | |
9314 | |
9315 | |
9316 EXAMPLES: | |
9317 | |
9318 1) Fit to a frequency-series | |
9319 | |
9320 % Create a frequency-series AO | |
9321 pl_data = plist('fsfcn', '0.01./(0.0001+f) + 5*abs(randn(size(f))) ', 'f1', 1e-5, 'f2', 5, 'nf', 1000); | |
9322 a = ao(pl_data); | |
9323 | |
9324 % Fitting parameter list | |
9325 pl_fit = plist('Function', 'P(1)./(P(2) + Xdata) + P(3)', ... | |
9326 'P0', [0.1 0.01 1]); | |
9327 % Do fit | |
9328 b = curvefit(a, pl_fit); | |
9329 | |
9330 | |
9331 2) Fit to a noisy sine-wave that has a known dc offset | |
9332 | |
9333 % Create a noisy sine-wave | |
9334 fs = 10; | |
9335 nsecs = 500; | |
9336 pl_sw = plist('waveform', 'Sine wave', 'f', 0.01, 'A', 0.6, 'fs', fs, 'nsecs', nsecs); | |
9337 sw = ao(pl_sw); | |
9338 noise = ao(plist('tsfcn', '10 + 0.01*randn(size(t))', 'fs', fs, 'nsecs', nsecs)); | |
9339 sw = sw+noise; | |
9340 | |
9341 % Fitting parameters | |
9342 pl_fit = plist('Function', 'ADDP{1} + P(1).*sin(2*pi*P(2).*Xdata + P(3))', ... | |
9343 'P0', [1 0.01 0], ... | |
9344 'LB', [0 0 -pi], ... | |
9345 'UB', [1 0.3 pi], ... | |
9346 'ADDP', {10}); | |
9347 | |
9348 % Do fit | |
9349 b = curvefit(sw, pl_fit); | |
9350 | |
9351 | |
9352 M-FILE INFO: Get information about this methods by calling | |
9353 >> ao.getInfo('curvefit') | |
9354 | |
9355 Get information about a specified set-plist by calling: | |
9356 >> ao.getInfo('curvefit', 'None') | |
9357 | |
9358 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
9359 | |
9360 HISTORY: 12-09-08 M Hewitson | |
9361 Creation | |
9362 | |
9363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9364 </HelpText> | |
9365 <sets> | |
9366 <set name="Default"/> | |
9367 </sets> | |
9368 <plists> | |
9369 <plist name="none"> | |
9370 <param> | |
9371 <key>FUNCTION</key> | |
9372 <val>P(1).*sawtooth(2*pi*P(2).*Xdata, P(3))</val> | |
9373 <type>char</type> | |
9374 </param> | |
9375 <param> | |
9376 <key>NO FIT</key> | |
9377 <val>false</val> | |
9378 <type>logical</type> | |
9379 </param> | |
9380 <param> | |
9381 <key>P0</key> | |
9382 <val>[0.1 0.2 0.5]</val> | |
9383 <type>double</type> | |
9384 </param> | |
9385 <param> | |
9386 <key>LB</key> | |
9387 <val>[0.05 0.18 0]</val> | |
9388 <type>double</type> | |
9389 </param> | |
9390 <param> | |
9391 <key>UB</key> | |
9392 <val>[0.2 0.22 1]</val> | |
9393 <type>double</type> | |
9394 </param> | |
9395 <param> | |
9396 <key>OPTSET</key> | |
9397 <val/> | |
9398 <type>char</type> | |
9399 </param> | |
9400 <param> | |
9401 <key>FITUNCERTAINTY</key> | |
9402 <val>true</val> | |
9403 <type>logical</type> | |
9404 </param> | |
9405 <param> | |
9406 <key>FITFUNCRETURN</key> | |
9407 <val>abs</val> | |
9408 <type>char</type> | |
9409 </param> | |
9410 </plist> | |
9411 </plists> | |
9412 </LTPDAalgorithm> | |
9413 <plist name="none"> | |
9414 <param> | |
9415 <key>FUNCTION</key> | |
9416 <val>P(1).*sawtooth(2*pi*P(2).*Xdata, P(3))</val> | |
9417 <type>char</type> | |
9418 </param> | |
9419 <param> | |
9420 <key>NO FIT</key> | |
9421 <val>false</val> | |
9422 <type>logical</type> | |
9423 </param> | |
9424 <param> | |
9425 <key>P0</key> | |
9426 <val>[0.1 0.2 0.5]</val> | |
9427 <type>double</type> | |
9428 </param> | |
9429 <param> | |
9430 <key>LB</key> | |
9431 <val>[0.05 0.18 0]</val> | |
9432 <type>double</type> | |
9433 </param> | |
9434 <param> | |
9435 <key>UB</key> | |
9436 <val>[0.2 0.22 1]</val> | |
9437 <type>double</type> | |
9438 </param> | |
9439 <param> | |
9440 <key>OPTSET</key> | |
9441 <val/> | |
9442 <type>char</type> | |
9443 </param> | |
9444 <param> | |
9445 <key>FITUNCERTAINTY</key> | |
9446 <val>true</val> | |
9447 <type>logical</type> | |
9448 </param> | |
9449 <param> | |
9450 <key>FITFUNCRETURN</key> | |
9451 <val>abs</val> | |
9452 <type>char</type> | |
9453 </param> | |
9454 </plist> | |
9455 <port number="0" terminal="" type="output"> | |
9456 <node> | |
9457 <pipe color="-3657166" dstblock="New Block" dstport="0" srcblock="fit" thickness="2.5"/> | |
9458 </node> | |
9459 </port> | |
9460 <port number="1" terminal="" type="output"> | |
9461 <node> | |
9462 <pipe color="-3657166" dstblock="New Block" dstport="2" srcblock="fit" thickness="2.5"/> | |
9463 </node> | |
9464 </port> | |
9465 <port number="2" terminal="" type="output"> | |
9466 <node> | |
9467 <pipe color="-3657166" dstblock="New Block" dstport="3" srcblock="fit" thickness="2.5"/> | |
9468 </node> | |
9469 </port> | |
9470 </block> | |
9471 <block bounds="453 121 48 89" inputs="4" name="New Block" outputs="1"> | |
9472 <LTPDAalgorithm mcategory="Output" mclass="ao" mname="iplot" mpackage="" mversion="" portdims="1 10 1 10"> | |
9473 <HelpText> IPLOT provides an intelligent plotting tool for LTPDA. | |
9474 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9475 | |
9476 DESCRIPTION: IPLOT provides an intelligent plotting tool for LTPDA. | |
9477 | |
9478 CALL: hfig = iplot (a,pl) | |
9479 [hfig, hax] = iplot (a,pl) | |
9480 [hfig, hax, hli] = iplot (a,pl) | |
9481 | |
9482 INPUTS: pl - a parameter list | |
9483 a - input analysis object | |
9484 | |
9485 OUTPUTS: hfig - handles to figures | |
9486 hax - handles to axes | |
9487 hli - handles to lines | |
9488 | |
9489 | |
9490 Plot parameters: | |
9491 | |
9492 'Arrangement' - select the plot layout: | |
9493 'single' - plots all AOs on individual figures | |
9494 'stacked' - plots all AOs on the same axes [default] | |
9495 'subplots' - plots all AOs on subplots | |
9496 | |
9497 'Function' - specify the plot function: | |
9498 'plot', 'stairs', 'stem' | |
9499 [default: 'plot'] | |
9500 *** doesn't work for xyzdata AOs | |
9501 | |
9502 Line parameters: | |
9503 | |
9504 The following properties take cell array values. If the length of | |
9505 the cell array is shorter than the number of lines to plot, the | |
9506 remaining lines will be plotted with the default options. If the | |
9507 cell array is of length 2 and the first cell contains the string | |
9508 'all', then the second cell is used to set the propery of all | |
9509 lines. | |
9510 | |
9511 'LineColors' - a cell array of color definitions for each line. | |
9512 | |
9513 'LineStyles' - a cell array of line styles. | |
9514 | |
9515 'Markers' - a cell array of markers. | |
9516 | |
9517 'LineWidths' - a cell array of line widths. If the length of the | |
9518 cell array is shorter than the number of lines to | |
9519 plot, the remaining lines will be plotted with | |
9520 the default line width. | |
9521 | |
9522 Axes parameters: | |
9523 | |
9524 'Legends' - specify a cell array of strings to be used for | |
9525 the plot legends. If a cell contains an empty | |
9526 string, the default legend string is built. | |
9527 If a single string 'off' is given instead of a | |
9528 cell array, then the legends are all switched | |
9529 off. | |
9530 | |
9531 'XLabels' - Specify the labels to be used on the x-axes. The | |
9532 units are added from the data object 'xunits' | |
9533 property. | |
9534 | |
9535 'YLabels' - Specify the labels to be used on the y-axes. The | |
9536 units are added from the data object 'yunits' | |
9537 property. If the object contains complex data, | |
9538 you should specify two y-labels for that object. | |
9539 | |
9540 The following axis properties also work with the 'all' keyword as | |
9541 described above in the line properties section. | |
9542 | |
9543 'XScales' - Specify the scales to be used on the x-axes. | |
9544 | |
9545 'YScales' - Specify the scales to the used on the y-axes. If | |
9546 an object contains complex data, you should | |
9547 specify two y-labels for that object. | |
9548 | |
9549 'XRanges' - Specify the ranges to be displayed on the x-axes. | |
9550 | |
9551 'YRanges' - Specify the ranges to the displayed on the | |
9552 y-axes. | |
9553 | |
9554 Error parameters: If you give more than one input AO then you must | |
9555 specify the following parameter values in a cell-array, | |
9556 one cell for each input AO. Leave the cell empty to | |
9557 plot no errors. Each error can be a value or a vector | |
9558 the same length as the data vector. If you give and | |
9559 upper limit but not lower limit, then the errors are | |
9560 assumed to be symmetric (and vice versa) | |
9561 | |
9562 'XerrL' - lower bound error values for the X data points. | |
9563 'XerrU' - upper bound error values for the X data points. | |
9564 'YerrL' - lower bound error values for the Y data points. | |
9565 'YerrU' - upper bound error values for the Y data points. | |
9566 | |
9567 Math operations: You can specify rudimentary math operations to be | |
9568 performed on the X and Y data prior to plotting. The | |
9569 'all' keyword is also supported by these parameters. | |
9570 | |
9571 'Xmaths' - specify math operations to perform on the | |
9572 data vector 'x'. For example, | |
9573 plist('Xmaths', 'abs(x)'). | |
9574 | |
9575 'Ymaths' - specify math operations to perform on the | |
9576 data vector 'y'. For example, | |
9577 plist('Ymaths', 'sqrt(y)'). | |
9578 | |
9579 Time-series parameters: in addition to the general options, time-series | |
9580 objects have the following additional parameters. | |
9581 | |
9582 'Xunits' - specify the units on the x-axis as | |
9583 'us' - microseconds | |
9584 'ms' - milliseconds | |
9585 's' - seconds [default] | |
9586 'm' - minutes | |
9587 'h' - hours | |
9588 'D' - days | |
9589 'M' - months | |
9590 'HH:MM:SS' - using a date/time format | |
9591 recognized by datetic (help datetic) | |
9592 | |
9593 | |
9594 Frequency-series parameters: | |
9595 | |
9596 'complexPlotType' - specify how to plot complex data. | |
9597 Choose from: | |
9598 - 'realimag' | |
9599 - 'absdeg' | |
9600 - 'absrad' | |
9601 | |
9602 EXAMPLES: | |
9603 | |
9604 1) Plot two time-series AOs with different colors, line styles, and widths | |
9605 | |
9606 pl = plist('Linecolors', {'g', 'k'}, 'LineStyles', {'', '--'}, 'LineWidths', {1, 4}); | |
9607 iplot(tsao1, tsao2, pl); | |
9608 | |
9609 2) Plot two time-series AOs in subplots. Also override the second legend | |
9610 text and the first line style. | |
9611 | |
9612 pl = plist('Arrangement', 'subplots', 'LineStyles', {'--'}, 'Legends', {'', 'My Sine Wave'}); | |
9613 iplot(tsao1, tsao2, pl); | |
9614 | |
9615 3) Plot two time-series AOs taking the square of the y-values of the | |
9616 first AO and the log of the x-values of the second AO. | |
9617 | |
9618 pl = plist('Arrangement', 'subplots', 'YMaths', 'y.^2', 'XMaths', {'', 'log(x)'}); | |
9619 iplot(tsao1, tsao2, pl); | |
9620 | |
9621 4) Plot two frequency-series AOs on subplots with the same Y-scales and | |
9622 Y-ranges | |
9623 | |
9624 pl1 = plist('Yscales', {'All', 'lin'}); | |
9625 pl2 = plist('arrangement', 'subplots', 'YRanges', {'All', [1e-6 100]}); | |
9626 iplot(fsd1, fsd2, pl1, pl2) | |
9627 | |
9628 | |
9629 M-FILE INFO: Get information about this methods by calling | |
9630 >> ao.getInfo('iplot') | |
9631 | |
9632 Get information about a specified set-plist by calling: | |
9633 >> ao.getInfo('iplot', 'None') | |
9634 | |
9635 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
9636 | |
9637 HISTORY: 22-12-07 M Hewitson | |
9638 Creation | |
9639 | |
9640 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9641 </HelpText> | |
9642 <sets> | |
9643 <set name="Time-series plot"/> | |
9644 <set name="Frequency-series plot"/> | |
9645 <set name="Y data plot"/> | |
9646 <set name="X-Y data plot"/> | |
9647 <set name="3D plot"/> | |
9648 </sets> | |
9649 <plists> | |
9650 <plist name="none"> | |
9651 <param> | |
9652 <key>COLORS</key> | |
9653 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
9654 <type>cell</type> | |
9655 </param> | |
9656 <param> | |
9657 <key>ARRANGEMENT</key> | |
9658 <val>stacked</val> | |
9659 <type>char</type> | |
9660 </param> | |
9661 <param> | |
9662 <key>FUNCTION</key> | |
9663 <val>plot</val> | |
9664 <type>char</type> | |
9665 </param> | |
9666 <param> | |
9667 <key>LEGENDLOCATION</key> | |
9668 <val>NorthEast</val> | |
9669 <type>char</type> | |
9670 </param> | |
9671 <param> | |
9672 <key>XERRL</key> | |
9673 <val>[]</val> | |
9674 <type>double</type> | |
9675 </param> | |
9676 <param> | |
9677 <key>XERRU</key> | |
9678 <val>[]</val> | |
9679 <type>double</type> | |
9680 </param> | |
9681 <param> | |
9682 <key>YERRU</key> | |
9683 <val>[]</val> | |
9684 <type>double</type> | |
9685 </param> | |
9686 <param> | |
9687 <key>YERRL</key> | |
9688 <val>[]</val> | |
9689 <type>double</type> | |
9690 </param> | |
9691 <param> | |
9692 <key>XLABEL</key> | |
9693 <val>Time</val> | |
9694 <type>char</type> | |
9695 </param> | |
9696 <param> | |
9697 <key>YLABEL</key> | |
9698 <val>Amplitude</val> | |
9699 <type>char</type> | |
9700 </param> | |
9701 </plist> | |
9702 <plist name="none"> | |
9703 <param> | |
9704 <key>COLORS</key> | |
9705 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
9706 <type>cell</type> | |
9707 </param> | |
9708 <param> | |
9709 <key>ARRANGEMENT</key> | |
9710 <val>stacked</val> | |
9711 <type>char</type> | |
9712 </param> | |
9713 <param> | |
9714 <key>FUNCTION</key> | |
9715 <val>plot</val> | |
9716 <type>char</type> | |
9717 </param> | |
9718 <param> | |
9719 <key>LEGENDLOCATION</key> | |
9720 <val>NorthEast</val> | |
9721 <type>char</type> | |
9722 </param> | |
9723 <param> | |
9724 <key>XERRL</key> | |
9725 <val>[]</val> | |
9726 <type>double</type> | |
9727 </param> | |
9728 <param> | |
9729 <key>XERRU</key> | |
9730 <val>[]</val> | |
9731 <type>double</type> | |
9732 </param> | |
9733 <param> | |
9734 <key>YERRU</key> | |
9735 <val>[]</val> | |
9736 <type>double</type> | |
9737 </param> | |
9738 <param> | |
9739 <key>YERRL</key> | |
9740 <val>[]</val> | |
9741 <type>double</type> | |
9742 </param> | |
9743 <param> | |
9744 <key>COMPLEXPLOTTYPE</key> | |
9745 <val>absdeg</val> | |
9746 <type>char</type> | |
9747 </param> | |
9748 <param> | |
9749 <key>XLABEL</key> | |
9750 <val>Frequency</val> | |
9751 <type>char</type> | |
9752 </param> | |
9753 </plist> | |
9754 <plist name="none"> | |
9755 <param> | |
9756 <key>COLORS</key> | |
9757 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
9758 <type>cell</type> | |
9759 </param> | |
9760 <param> | |
9761 <key>ARRANGEMENT</key> | |
9762 <val>stacked</val> | |
9763 <type>char</type> | |
9764 </param> | |
9765 <param> | |
9766 <key>FUNCTION</key> | |
9767 <val>plot</val> | |
9768 <type>char</type> | |
9769 </param> | |
9770 <param> | |
9771 <key>LEGENDLOCATION</key> | |
9772 <val>NorthEast</val> | |
9773 <type>char</type> | |
9774 </param> | |
9775 <param> | |
9776 <key>XERRL</key> | |
9777 <val>[]</val> | |
9778 <type>double</type> | |
9779 </param> | |
9780 <param> | |
9781 <key>XERRU</key> | |
9782 <val>[]</val> | |
9783 <type>double</type> | |
9784 </param> | |
9785 <param> | |
9786 <key>YERRU</key> | |
9787 <val>[]</val> | |
9788 <type>double</type> | |
9789 </param> | |
9790 <param> | |
9791 <key>YERRL</key> | |
9792 <val>[]</val> | |
9793 <type>double</type> | |
9794 </param> | |
9795 <param> | |
9796 <key>XLABEL</key> | |
9797 <val>Sample</val> | |
9798 <type>char</type> | |
9799 </param> | |
9800 <param> | |
9801 <key>YLABEL</key> | |
9802 <val>Value</val> | |
9803 <type>char</type> | |
9804 </param> | |
9805 </plist> | |
9806 <plist name="none"> | |
9807 <param> | |
9808 <key>COLORS</key> | |
9809 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
9810 <type>cell</type> | |
9811 </param> | |
9812 <param> | |
9813 <key>ARRANGEMENT</key> | |
9814 <val>stacked</val> | |
9815 <type>char</type> | |
9816 </param> | |
9817 <param> | |
9818 <key>FUNCTION</key> | |
9819 <val>plot</val> | |
9820 <type>char</type> | |
9821 </param> | |
9822 <param> | |
9823 <key>LEGENDLOCATION</key> | |
9824 <val>NorthEast</val> | |
9825 <type>char</type> | |
9826 </param> | |
9827 <param> | |
9828 <key>XERRL</key> | |
9829 <val>[]</val> | |
9830 <type>double</type> | |
9831 </param> | |
9832 <param> | |
9833 <key>XERRU</key> | |
9834 <val>[]</val> | |
9835 <type>double</type> | |
9836 </param> | |
9837 <param> | |
9838 <key>YERRU</key> | |
9839 <val>[]</val> | |
9840 <type>double</type> | |
9841 </param> | |
9842 <param> | |
9843 <key>YERRL</key> | |
9844 <val>[]</val> | |
9845 <type>double</type> | |
9846 </param> | |
9847 <param> | |
9848 <key>XLABEL</key> | |
9849 <val>X-data</val> | |
9850 <type>char</type> | |
9851 </param> | |
9852 <param> | |
9853 <key>YLABEL</key> | |
9854 <val>Y-data</val> | |
9855 <type>char</type> | |
9856 </param> | |
9857 <param> | |
9858 <key>YMATHS</key> | |
9859 <val/> | |
9860 <type>char</type> | |
9861 </param> | |
9862 <param> | |
9863 <key>XMATHS</key> | |
9864 <val/> | |
9865 <type>char</type> | |
9866 </param> | |
9867 </plist> | |
9868 <plist name="none"> | |
9869 <param> | |
9870 <key>COLORS</key> | |
9871 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
9872 <type>cell</type> | |
9873 </param> | |
9874 <param> | |
9875 <key>ARRANGEMENT</key> | |
9876 <val>single</val> | |
9877 <type>char</type> | |
9878 </param> | |
9879 <param> | |
9880 <key>XLABEL</key> | |
9881 <val>Time</val> | |
9882 <type>char</type> | |
9883 </param> | |
9884 <param> | |
9885 <key>YLABEL</key> | |
9886 <val>Frequency</val> | |
9887 <type>char</type> | |
9888 </param> | |
9889 <param> | |
9890 <key>ZLABEL</key> | |
9891 <val>Amplitude</val> | |
9892 <type>char</type> | |
9893 </param> | |
9894 <param> | |
9895 <key>YMATHS</key> | |
9896 <val/> | |
9897 <type>char</type> | |
9898 </param> | |
9899 <param> | |
9900 <key>ZMATHS</key> | |
9901 <val/> | |
9902 <type>char</type> | |
9903 </param> | |
9904 <param> | |
9905 <key>XMATHS</key> | |
9906 <val/> | |
9907 <type>char</type> | |
9908 </param> | |
9909 </plist> | |
9910 </plists> | |
9911 </LTPDAalgorithm> | |
9912 <plist name="none"/> | |
9913 <port number="0" terminal="" type="output"/> | |
9914 </block> | |
9915 </document> | |
9916 <document name="Test Downsample" parentDiag="" visible="true" windowHeight="624" windowState="maximized" windowWidth="718" windowX="0" windowY="0" zoomFactor="1.6105101"> | |
9917 <block bounds="34 30 58 65" inputs="1" name="sw" outputs="1"> | |
9918 <LTPDAalgorithm mcategory="Constructor" mclass="ao" mname="ao" mpackage="" mversion="" portdims="1 10 1 10"> | |
9919 <HelpText> AO analysis object class constructor. | |
9920 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
9921 | |
9922 DESCRIPTION: AO analysis object class constructor. | |
9923 Create an analysis object. | |
9924 | |
9925 Possible constructors: | |
9926 | |
9927 a = ao() - creates an empty analysis object | |
9928 a = ao('a1.xml') - creates a new analysis object by loading the | |
9929 analysis object from disk. | |
9930 a = ao('a1.mat') - creates a new analysis object by loading the | |
9931 analysis object from disk. | |
9932 a = ao('a1.mat') - creates a new analysis object by loading the | |
9933 2-column data set stored in the .MAT file. | |
9934 a = ao('file.txt') - creates a new analysis object by loading the | |
9935 a = ao('file.dat') data in 'file.txt'. The ascii file is assumed | |
9936 to be an equally sampled two-column file of | |
9937 time and amplitude. By default, the amplitude | |
9938 units are taken to be Volts ('V') and the | |
9939 time samples are assumed to be in seconds. | |
9940 a = ao('file',pl) - creates a new analysis object by loading the | |
9941 data in 'file'. The parameter list decide how the | |
9942 analysis object is created. The valid key values | |
9943 of the parameter list are: | |
9944 'type' 'tsdata','fsdata','xydata' | |
9945 [default: 'tsdata'] | |
9946 'use_fs' if this value is set, the | |
9947 x-axes is computed by the fs value. | |
9948 [default: empty array] | |
9949 'columns' [1 2 1 4] | |
9950 Each pair represented the x- and y-axes. | |
9951 (Each column pair creates an analysis object) | |
9952 Is the value 'use_fs' is used then | |
9953 represent each column the y-axes. | |
9954 (Each column creates an analysis object) | |
9955 [default: [1 2] ] | |
9956 'comment_char' The comment character in the file | |
9957 [default: ''] | |
9958 'description' To set the description in the analysis object | |
9959 '...' every property where exist a public | |
9960 set-function in the AO class e.g. | |
9961 setName, setT0, setYunits, ... | |
9962 If the constructor creates multiple ao's it is | |
9963 possible to give each data class its own e.g. | |
9964 'name'. In this case the parameter list with the | |
9965 key 'name' must have cell of the different values | |
9966 as the name of the different data objects. e.g. | |
9967 pl = plist('columns', [1 2 1 3], ... | |
9968 'name', {'name1' 'name2'}, ... | |
9969 'xunits', unit('s'), ... | |
9970 'yunits', {unit('V') unit('Hz'})); | |
9971 This parameter list creates two ao's with tsdata. | |
9972 | |
9973 'Robust' - set this to 'yes' to use (slow) | |
9974 robust data reading. Useful for | |
9975 complicated file formats. | |
9976 [default: 'yes'] | |
9977 | |
9978 NOTE: Data files with comments at the end of the lines can only be | |
9979 read if there are no lines with only comments. In this case, do not | |
9980 specify a comment character. If you really want to load a file like | |
9981 this, specify the 'Robust' option; this will be very slow for large | |
9982 files. | |
9983 | |
9984 a = ao(data) - creates an analysis object with a data | |
9985 object. Data object can be one of tsdata, | |
9986 fsdata, cdata, xydata, xyzdata. | |
9987 a = ao(data, hist) - creates an analysis object with a data | |
9988 object and a history object | |
9989 a = ao(specwin) - creates an analysis object from a specwin | |
9990 object | |
9991 a = ao(plist) - creates an analysis object from the description | |
9992 given in the parameter list | |
9993 | |
9994 Parameter sets for plist constructor (in order of priority): | |
9995 | |
9996 From XML File | |
9997 ------------- | |
9998 | |
9999 Construct an AO by loading it from an XML file. | |
10000 | |
10001 'filename' - construct an AO from a filename. | |
10002 Example: plist('filename', 'a1.xml') | |
10003 [default: empty string] | |
10004 | |
10005 From MAT File | |
10006 ------------- | |
10007 | |
10008 Construct an AO by loading it from a MAT file. | |
10009 | |
10010 'filename' - construct an AO from a filename. | |
10011 Example: plist('filename', 'a1.mat') | |
10012 [default: empty string] | |
10013 | |
10014 From ASCII File | |
10015 --------------- | |
10016 | |
10017 Construct an AO by loading it from an ASCII text file. | |
10018 | |
10019 'filename' - construct an AO from a filename. | |
10020 Example: plist('filename', 'a1.txt') | |
10021 [default: empty string] | |
10022 | |
10023 For additional parameters, see constructor ao(file, pl) above. | |
10024 | |
10025 From Function | |
10026 ------------- | |
10027 | |
10028 Construct an AO from the description of any valid MATLAB function. | |
10029 | |
10030 'fcn' - any valid MATLAB function. | |
10031 Example: plist('fcn', 'randn(100,1)') | |
10032 | |
10033 You can pass additional parameters to the fcn as extra | |
10034 parameters in the parameter list: | |
10035 plist('fcn', 'a*b', 'a', 2, 'b', 1:20); | |
10036 | |
10037 ** Note: case is ignored in the function specification | |
10038 such the following: | |
10039 plist('fcn', 'a*A/b', 'a', 2, 'B', 1:20); | |
10040 results in: | |
10041 2*2*[1:20] | |
10042 | |
10043 [default: 'randn(100,1)'] | |
10044 | |
10045 From Values | |
10046 ----------- | |
10047 | |
10048 Construct an AO from a set of values. | |
10049 | |
10050 'vals' - a set of values. | |
10051 Example: plist('vals', [1 2 3]) | |
10052 optional parameter: repeat 'N' times | |
10053 Example: plist('vals', [1 2 3], 'N', 10) | |
10054 | |
10055 [default: vals: [1], N: [1] ] | |
10056 OR | |
10057 | |
10058 To produce a tsdata AO | |
10059 | |
10060 'xvals' - a set of x values. | |
10061 'yvals' - a set of y values. | |
10062 | |
10063 | |
10064 | |
10065 From Time-series Function | |
10066 ------------------------- | |
10067 | |
10068 Construct an AO from a function of time, t. | |
10069 | |
10070 'tsfcn' - a function of time. | |
10071 | |
10072 You can also specify optional parameters | |
10073 'fs' - sampling frequency [default: 10 Hz] | |
10074 'nsecs' - length in seconds [default: 10 s] | |
10075 | |
10076 You can also specify the initial time (t0) associated with | |
10077 the time-series by passing a parameter 't0' with a value | |
10078 that is a time object [default: time(0)] | |
10079 Example: | |
10080 plist('fs', 10, 'nsecs', 10, ... | |
10081 'tsfcn', 'sin(2*pi*1.4*t) + 0.1*randn(size(t))', ... | |
10082 't0', time('1980-12-01 12:43:12')); | |
10083 | |
10084 From Frequency-series Function | |
10085 ------------------------------ | |
10086 | |
10087 Construct an AO from a function of frequency, f. | |
10088 | |
10089 'fsfcn' - a function of frequency, f. [default: 'f'] | |
10090 | |
10091 You can also specify optional parameters: | |
10092 'f1' - the initial frequency [default: 1e-9] | |
10093 'f2' - the final frequency [default: 5] | |
10094 'nf' - the number of frequency samples [default: 1000] | |
10095 'scale' - 'log' or 'lin' frequency spacing [default: 'log'] | |
10096 or provide a frequency vector: | |
10097 'f' - a vector of frequencies on which to evaluate the | |
10098 function [default: [] ] | |
10099 | |
10100 From Window | |
10101 ----------- | |
10102 | |
10103 Construct an AO from a spectral window object. | |
10104 | |
10105 'win' - A specwin object. | |
10106 | |
10107 This creates a cdata type AO containing the window values. | |
10108 Example: plist('win', specwin('Hannning', 100)) | |
10109 | |
10110 [default: specwin('Hanning', 100)] | |
10111 | |
10112 From Waveform | |
10113 ------------- | |
10114 | |
10115 Construct an AO from a waveform description. | |
10116 | |
10117 'waveform' - a waveform description (see options below). | |
10118 | |
10119 You can also specify additional parameters: | |
10120 'fs' - sampling frequency [default: 10 Hz] | |
10121 'nsecs' - length in seconds [default: 10 s] | |
10122 't0' - time-stamp of the first data sample [default time(0)] | |
10123 | |
10124 and, for the following waveform types: | |
10125 'sine wave' - 'A', 'f', 'phi', 'nsecs', 'toff' | |
10126 (can be vectors for sum of sine waves) | |
10127 'A' - Amplitude of the wave | |
10128 'f' - Frequency of the wave | |
10129 'phi' - Phase of the eave | |
10130 'nsecs' - Number of seconds (in seconds) | |
10131 'toff' - Offset of the wave (in seconds) | |
10132 'noise' - 'type' (can be 'Normal' or 'Uniform') | |
10133 'sigma' specify the standard deviation | |
10134 'chirp' - 'f0', 'f1', 't1' (help chirp) | |
10135 'Gaussian pulse' - 'f0', 'bw' (help gauspuls) | |
10136 'Square wave' - 'f', 'duty' (help square) | |
10137 'Sawtooth' - 'f', 'width' (help sawtooth) | |
10138 | |
10139 You can also specify the initial time (t0) associated with | |
10140 the time-series by passing a parameter 't0' with a value | |
10141 that is a time object. | |
10142 | |
10143 [defaults: waveform: 'sine wave', A: 1, f: 1.23, phi: 0, | |
10144 fs: 10, nsecs: 10, t0: time(0) ] | |
10145 | |
10146 | |
10147 From Repository | |
10148 --------------- | |
10149 | |
10150 Construct an AO by retrieving it from an LTPDA repository. | |
10151 | |
10152 'Hostname' - the repository hostname. Only those objects which | |
10153 are AOs are returned. | |
10154 [default: 'localhost']; | |
10155 | |
10156 Additional parameters: | |
10157 | |
10158 'Database' - The database name [default: 'ltpda'] | |
10159 'ID' - A vector of object IDs. [default: []] | |
10160 'CID' - Retrieve all AO objects from a particular | |
10161 collection. | |
10162 'Binary' - Set to 'yes' to retrieve from stored binary | |
10163 representation (not always available). | |
10164 | |
10165 From Polynomial | |
10166 --------------- | |
10167 | |
10168 Construct an AO from a set of polynomial coefficients. | |
10169 | |
10170 'polyval' - a set of polynomial coefficients. | |
10171 [default: [-0.0001 0.02 -1 -1] ] | |
10172 | |
10173 Additional parameters: | |
10174 'Nsecs' and 'fs' - number of seconds, and sample rate | |
10175 [defaults: nsecs: 10, fs: 10] | |
10176 or 't' - vector of time vertices | |
10177 [default: [] ] | |
10178 | |
10179 Example: a = ao(plist('polyval', [1 2 3], 'Nsecs', 10, 'fs', 10)); | |
10180 | |
10181 | |
10182 From Pzmodel | |
10183 ------------ | |
10184 | |
10185 Generates an ao with a timeseries with a prescribed spectrum. | |
10186 p = [pz(f1,q1) pz(f2,q2)] | |
10187 z = [pz(f3,q3)] | |
10188 pzm = pzmodel(gain, p, z) | |
10189 The constructor also needs: fs - sampling frequency | |
10190 nsecs - number of seconds to be generated | |
10191 a = ao(plist('pzmodel', pzm, 'Nsecs', nsecs, 'Fs', fs)) | |
10192 | |
10193 From Model | |
10194 ---------- | |
10195 | |
10196 A collection of built-in models which construct data series and return | |
10197 them in AOs. | |
10198 | |
10199 'Model' - give the model name. To get a list of models: | |
10200 ao(plist('Model', '')) | |
10201 | |
10202 Each model has additional parameters that need to be passed. To see the | |
10203 parameters: | |
10204 >> help ao.<model_name> | |
10205 | |
10206 for example, | |
10207 | |
10208 >> help ao.mdc1_fd_dynamics | |
10209 | |
10210 From Plist | |
10211 ---------- | |
10212 | |
10213 'Plist' - construct from a plist. The value passed should be a plist | |
10214 object. | |
10215 [default: empty plist] | |
10216 | |
10217 | |
10218 | |
10219 Examples: | |
10220 | |
10221 1) Normally distributed random noise time-series | |
10222 | |
10223 p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000); | |
10224 rd10 = ao(p); | |
10225 | |
10226 | |
10227 Indexing: | |
10228 b = a(1) % where a is an array of analysis objects | |
10229 d = a.data; % get the data object | |
10230 h = a.hist; % get the history object | |
10231 d = a.data.x(1:20); % get a matrix of data values x; | |
10232 | |
10233 2) Timeseries with a prescribed spectrum | |
10234 | |
10235 p = plist('pzmodel',pzm, 'fs',10, 'nsecs', 120, 'ndigits',50) | |
10236 a = ao(p) | |
10237 | |
10238 fs - sampling frequency | |
10239 nsecs - number of seconds in time series | |
10240 ndigits - number of digits for symbolic math toolbox (default: 32) | |
10241 | |
10242 | |
10243 From pzmodel | |
10244 ------------ | |
10245 | |
10246 Generates an ao with a timeseries with a prescribed spectrum. | |
10247 p = [pz(f1,q1) pz(f2,q2)] | |
10248 z = [pz(f3,q3)] | |
10249 pzm = pzmodel(gain, p, z) | |
10250 The constructor also needs: fs - sampling frequency | |
10251 nsecs - number of seconds to be generated | |
10252 a = ao(pzm, nsecs, fs) | |
10253 | |
10254 The following call returns an minfo object that contains information | |
10255 about the AO constructor: | |
10256 | |
10257 >> info = ao.getInfo | |
10258 | |
10259 You can get information about class methods by calling: | |
10260 | |
10261 >> info = ao.getInfo(method) | |
10262 | |
10263 e.g. info = ao.getInfo('psd') | |
10264 | |
10265 You can also restrict the sets of parameters contained in the minfo | |
10266 object by calling: | |
10267 | |
10268 >> info = ao.getInfo(method, set) | |
10269 | |
10270 e.g., info = ao.getInfo('ao', 'From Vals') | |
10271 | |
10272 See also tsdata, fsdata, xydata, cdata, xyzdata | |
10273 | |
10274 M Hewitson 30-01-07 | |
10275 | |
10276 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10277 </HelpText> | |
10278 <sets> | |
10279 <set name="Default"/> | |
10280 <set name="From XML File"/> | |
10281 <set name="From MAT File"/> | |
10282 <set name="From ASCII File"/> | |
10283 <set name="From Function"/> | |
10284 <set name="From Values"/> | |
10285 <set name="From Time-series Function"/> | |
10286 <set name="From Frequency-series Function"/> | |
10287 <set name="From Window"/> | |
10288 <set name="From Waveform"/> | |
10289 <set name="From Polynomial"/> | |
10290 <set name="From Repository"/> | |
10291 <set name="From Plist"/> | |
10292 <set name="From Pzmodel"/> | |
10293 <set name="From Model"/> | |
10294 </sets> | |
10295 <plists> | |
10296 <plist name="none"/> | |
10297 <plist name="none"> | |
10298 <param> | |
10299 <key>FILENAME</key> | |
10300 <val/> | |
10301 <type>char</type> | |
10302 </param> | |
10303 </plist> | |
10304 <plist name="none"> | |
10305 <param> | |
10306 <key>FILENAME</key> | |
10307 <val/> | |
10308 <type>char</type> | |
10309 </param> | |
10310 </plist> | |
10311 <plist name="none"> | |
10312 <param> | |
10313 <key>FILENAME</key> | |
10314 <val/> | |
10315 <type>char</type> | |
10316 </param> | |
10317 <param> | |
10318 <key>TYPE</key> | |
10319 <val>tsdata</val> | |
10320 <type>char</type> | |
10321 </param> | |
10322 <param> | |
10323 <key>COLUMNS</key> | |
10324 <val>[1 2]</val> | |
10325 <type>double</type> | |
10326 </param> | |
10327 <param> | |
10328 <key>XUNITS</key> | |
10329 <val>[ unit(' s ') ]</val> | |
10330 <type>unit</type> | |
10331 </param> | |
10332 <param> | |
10333 <key>YUNITS</key> | |
10334 <val>[ unit(' ') ]</val> | |
10335 <type>unit</type> | |
10336 </param> | |
10337 <param> | |
10338 <key>T0</key> | |
10339 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
10340 <type>time</type> | |
10341 </param> | |
10342 <param> | |
10343 <key>COMMENT_CHAR</key> | |
10344 <val/> | |
10345 <type>char</type> | |
10346 </param> | |
10347 <param> | |
10348 <key>USE_FS</key> | |
10349 <val/> | |
10350 <type>char</type> | |
10351 </param> | |
10352 <param> | |
10353 <key>ROBUST</key> | |
10354 <val>yes</val> | |
10355 <type>char</type> | |
10356 </param> | |
10357 </plist> | |
10358 <plist name="none"> | |
10359 <param> | |
10360 <key>FCN</key> | |
10361 <val>randn(100,1)</val> | |
10362 <type>char</type> | |
10363 </param> | |
10364 <param> | |
10365 <key>YUNITS</key> | |
10366 <val>[ unit(' ') ]</val> | |
10367 <type>unit</type> | |
10368 </param> | |
10369 </plist> | |
10370 <plist name="none"> | |
10371 <param> | |
10372 <key>VALS</key> | |
10373 <val>0.1</val> | |
10374 <type>double</type> | |
10375 </param> | |
10376 <param> | |
10377 <key>N</key> | |
10378 <val>1</val> | |
10379 <type>double</type> | |
10380 </param> | |
10381 <param> | |
10382 <key>DTYPE</key> | |
10383 <val/> | |
10384 <type>char</type> | |
10385 </param> | |
10386 <param> | |
10387 <key>FS</key> | |
10388 <val>[]</val> | |
10389 <type>double</type> | |
10390 </param> | |
10391 <param> | |
10392 <key>XVALS</key> | |
10393 <val>[]</val> | |
10394 <type>double</type> | |
10395 </param> | |
10396 <param> | |
10397 <key>YVALS</key> | |
10398 <val>[]</val> | |
10399 <type>double</type> | |
10400 </param> | |
10401 <param> | |
10402 <key>YUNITS</key> | |
10403 <val/> | |
10404 <type>char</type> | |
10405 </param> | |
10406 </plist> | |
10407 <plist name="none"> | |
10408 <param> | |
10409 <key>TSFCN</key> | |
10410 <val>sin(2*pi*0.433*t)</val> | |
10411 <type>char</type> | |
10412 </param> | |
10413 <param> | |
10414 <key>FS</key> | |
10415 <val>10</val> | |
10416 <type>double</type> | |
10417 </param> | |
10418 <param> | |
10419 <key>NSECS</key> | |
10420 <val>100</val> | |
10421 <type>double</type> | |
10422 </param> | |
10423 <param> | |
10424 <key>T0</key> | |
10425 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
10426 <type>time</type> | |
10427 </param> | |
10428 <param> | |
10429 <key>XUNITS</key> | |
10430 <val>[ unit(' s ') ]</val> | |
10431 <type>unit</type> | |
10432 </param> | |
10433 <param> | |
10434 <key>YUNITS</key> | |
10435 <val>[ unit(' ') ]</val> | |
10436 <type>unit</type> | |
10437 </param> | |
10438 </plist> | |
10439 <plist name="none"> | |
10440 <param> | |
10441 <key>FSFCN</key> | |
10442 <val>f</val> | |
10443 <type>char</type> | |
10444 </param> | |
10445 <param> | |
10446 <key>F1</key> | |
10447 <val>1e-09</val> | |
10448 <type>double</type> | |
10449 </param> | |
10450 <param> | |
10451 <key>F2</key> | |
10452 <val>5</val> | |
10453 <type>double</type> | |
10454 </param> | |
10455 <param> | |
10456 <key>NF</key> | |
10457 <val>1000</val> | |
10458 <type>double</type> | |
10459 </param> | |
10460 <param> | |
10461 <key>SCALE</key> | |
10462 <val>log</val> | |
10463 <type>char</type> | |
10464 </param> | |
10465 <param> | |
10466 <key>F</key> | |
10467 <val>[]</val> | |
10468 <type>double</type> | |
10469 </param> | |
10470 <param> | |
10471 <key>XUNITS</key> | |
10472 <val>[ unit(' Hz ') ]</val> | |
10473 <type>unit</type> | |
10474 </param> | |
10475 <param> | |
10476 <key>YUNITS</key> | |
10477 <val>[ unit(' ') ]</val> | |
10478 <type>unit</type> | |
10479 </param> | |
10480 </plist> | |
10481 <plist name="none"> | |
10482 <param> | |
10483 <key>WIN</key> | |
10484 <val> specwin('Hanning', 100)</val> | |
10485 <type>specwin</type> | |
10486 </param> | |
10487 <param> | |
10488 <key>YUNITS</key> | |
10489 <val>[ unit(' ') ]</val> | |
10490 <type>unit</type> | |
10491 </param> | |
10492 </plist> | |
10493 <plist name="none"> | |
10494 <param> | |
10495 <key>WAVEFORM</key> | |
10496 <val>sine wave</val> | |
10497 <type>char</type> | |
10498 </param> | |
10499 <param> | |
10500 <key>A</key> | |
10501 <val>1</val> | |
10502 <type>double</type> | |
10503 </param> | |
10504 <param> | |
10505 <key>F</key> | |
10506 <val>1.23</val> | |
10507 <type>double</type> | |
10508 </param> | |
10509 <param> | |
10510 <key>PHI</key> | |
10511 <val>0</val> | |
10512 <type>double</type> | |
10513 </param> | |
10514 <param> | |
10515 <key>FS</key> | |
10516 <val>10</val> | |
10517 <type>double</type> | |
10518 </param> | |
10519 <param> | |
10520 <key>NSECS</key> | |
10521 <val>10</val> | |
10522 <type>double</type> | |
10523 </param> | |
10524 <param> | |
10525 <key>T0</key> | |
10526 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
10527 <type>time</type> | |
10528 </param> | |
10529 <param> | |
10530 <key>TOFF</key> | |
10531 <val>0</val> | |
10532 <type>double</type> | |
10533 </param> | |
10534 <param> | |
10535 <key>XUNITS</key> | |
10536 <val>[ unit(' s ') ]</val> | |
10537 <type>unit</type> | |
10538 </param> | |
10539 <param> | |
10540 <key>YUNITS</key> | |
10541 <val>[ unit(' ') ]</val> | |
10542 <type>unit</type> | |
10543 </param> | |
10544 </plist> | |
10545 <plist name="none"> | |
10546 <param> | |
10547 <key>POLYVAL</key> | |
10548 <val>[-0.0001 0.02 -1 -1]</val> | |
10549 <type>double</type> | |
10550 </param> | |
10551 <param> | |
10552 <key>NSECS</key> | |
10553 <val>10</val> | |
10554 <type>double</type> | |
10555 </param> | |
10556 <param> | |
10557 <key>FS</key> | |
10558 <val>10</val> | |
10559 <type>double</type> | |
10560 </param> | |
10561 <param> | |
10562 <key>T</key> | |
10563 <val>[]</val> | |
10564 <type>double</type> | |
10565 </param> | |
10566 <param> | |
10567 <key>XUNITS</key> | |
10568 <val>[ unit(' s ') ]</val> | |
10569 <type>unit</type> | |
10570 </param> | |
10571 <param> | |
10572 <key>YUNITS</key> | |
10573 <val>[ unit(' ') ]</val> | |
10574 <type>unit</type> | |
10575 </param> | |
10576 </plist> | |
10577 <plist name="none"> | |
10578 <param> | |
10579 <key>HOSTNAME</key> | |
10580 <val>localhost</val> | |
10581 <type>char</type> | |
10582 </param> | |
10583 <param> | |
10584 <key>DATABASE</key> | |
10585 <val>ltpda</val> | |
10586 <type>char</type> | |
10587 </param> | |
10588 <param> | |
10589 <key>ID</key> | |
10590 <val>[]</val> | |
10591 <type>double</type> | |
10592 </param> | |
10593 <param> | |
10594 <key>BINARY</key> | |
10595 <val>no</val> | |
10596 <type>char</type> | |
10597 </param> | |
10598 </plist> | |
10599 <plist name="none"> | |
10600 <param> | |
10601 <key>PLIST</key> | |
10602 <val>(empty-plist)</val> | |
10603 <type>plist</type> | |
10604 </param> | |
10605 </plist> | |
10606 <plist name="none"> | |
10607 <param> | |
10608 <key>PZMODEL</key> | |
10609 <val>pzmodel(none)</val> | |
10610 <type>pzmodel</type> | |
10611 </param> | |
10612 <param> | |
10613 <key>NSECS</key> | |
10614 <val>0</val> | |
10615 <type>double</type> | |
10616 </param> | |
10617 <param> | |
10618 <key>FS</key> | |
10619 <val>0</val> | |
10620 <type>double</type> | |
10621 </param> | |
10622 <param> | |
10623 <key>XUNITS</key> | |
10624 <val>[ unit(' s ') ]</val> | |
10625 <type>unit</type> | |
10626 </param> | |
10627 <param> | |
10628 <key>YUNITS</key> | |
10629 <val>[ unit(' ') ]</val> | |
10630 <type>unit</type> | |
10631 </param> | |
10632 </plist> | |
10633 <plist name="none"> | |
10634 <param> | |
10635 <key>MODEL</key> | |
10636 <val/> | |
10637 <type>char</type> | |
10638 </param> | |
10639 </plist> | |
10640 </plists> | |
10641 </LTPDAalgorithm> | |
10642 <plist name="none"> | |
10643 <param> | |
10644 <key>TSFCN</key> | |
10645 <val>sin(2*pi*0.433*t)</val> | |
10646 <type>char</type> | |
10647 </param> | |
10648 <param> | |
10649 <key>FS</key> | |
10650 <val>10</val> | |
10651 <type>double</type> | |
10652 </param> | |
10653 <param> | |
10654 <key>NSECS</key> | |
10655 <val>100</val> | |
10656 <type>double</type> | |
10657 </param> | |
10658 <param> | |
10659 <key>T0</key> | |
10660 <val>time([plist('TIMEFORMAT', 'yyyy-mm-dd HH:MM:SS.FFF', 'TIMEZONE', 'UTC', 'UTC_EPOCH_MILLI', 0)]) </val> | |
10661 <type>time</type> | |
10662 </param> | |
10663 <param> | |
10664 <key>XUNITS</key> | |
10665 <val>[ unit(' s ') ]</val> | |
10666 <type>unit</type> | |
10667 </param> | |
10668 <param> | |
10669 <key>YUNITS</key> | |
10670 <val>[ unit(' ') ]</val> | |
10671 <type>unit</type> | |
10672 </param> | |
10673 </plist> | |
10674 <port number="0" terminal="" type="output"> | |
10675 <node> | |
10676 <pipe color="-3657166" dstblock="New Block" dstport="0" srcblock="sw" thickness="2.5"/> | |
10677 <pipe color="-3657166" dstblock="New Block_1" dstport="0" srcblock="sw" thickness="2.5"/> | |
10678 <pipe color="-3657166" dstblock="New Block_1_1" dstport="3" srcblock="sw" thickness="2.5"/> | |
10679 </node> | |
10680 </port> | |
10681 </block> | |
10682 <block bounds="196 17 95 48" inputs="1" name="New Block" outputs="1"> | |
10683 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="downsample" mpackage="" mversion="" portdims="1 10 1 10"> | |
10684 <HelpText> DOWNSAMPLE AOs containing time-series data. | |
10685 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10686 | |
10687 DESCRIPTION: DOWNSAMPLE AOs containing time-series data. | |
10688 | |
10689 CALL: b = downsample(a, pl) - use plist to get parameters | |
10690 b = downsample(a1, a2, pl) - downsample both a1 and a2; b is then a 2x1 | |
10691 vector. | |
10692 | |
10693 PARAMETERS: 'factor' - decimation factor [default: 1] | |
10694 'offset' - sample offset for decimation [default: 0] | |
10695 | |
10696 EXAMPLES: 1) downsample x4; offset is set to default of 0 | |
10697 | |
10698 >> p = plist('factor',4); | |
10699 >> b = downsample(a, p); | |
10700 | |
10701 2) downsample x2 with 1 sample offset | |
10702 | |
10703 >> p = plist('factor',2,'offset',1); | |
10704 >> b = downsample(a,p); | |
10705 | |
10706 M-FILE INFO: Get information about this methods by calling | |
10707 >> ao.getInfo('downsample') | |
10708 | |
10709 Get information about a specified set-plist by calling: | |
10710 >> ao.getInfo('downsample', 'None') | |
10711 | |
10712 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
10713 | |
10714 HISTORY: 14-05-07 M Hewitson | |
10715 Creation | |
10716 | |
10717 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10718 </HelpText> | |
10719 <sets> | |
10720 <set name="Default"/> | |
10721 </sets> | |
10722 <plists> | |
10723 <plist name="none"> | |
10724 <param> | |
10725 <key>FACTOR</key> | |
10726 <val>2</val> | |
10727 <type>double</type> | |
10728 </param> | |
10729 <param> | |
10730 <key>OFFSET</key> | |
10731 <val>0</val> | |
10732 <type>double</type> | |
10733 </param> | |
10734 </plist> | |
10735 </plists> | |
10736 </LTPDAalgorithm> | |
10737 <plist name="none"> | |
10738 <param> | |
10739 <key>FACTOR</key> | |
10740 <val>2</val> | |
10741 <type>double</type> | |
10742 </param> | |
10743 <param> | |
10744 <key>OFFSET</key> | |
10745 <val>0</val> | |
10746 <type>double</type> | |
10747 </param> | |
10748 </plist> | |
10749 <port number="0" terminal="" type="output"> | |
10750 <node> | |
10751 <pipe color="-3657166" dstblock="New Block_1_1" dstport="0" srcblock="New Block" thickness="2.5"/> | |
10752 </node> | |
10753 </port> | |
10754 </block> | |
10755 <block bounds="124 125 58 63" inputs="1" name="New Block_1" outputs="1"> | |
10756 <LTPDAalgorithm mcategory="Signal Processing" mclass="ao" mname="downsample" mpackage="" mversion="" portdims="1 10 1 10"> | |
10757 <HelpText> DOWNSAMPLE AOs containing time-series data. | |
10758 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10759 | |
10760 DESCRIPTION: DOWNSAMPLE AOs containing time-series data. | |
10761 | |
10762 CALL: b = downsample(a, pl) - use plist to get parameters | |
10763 b = downsample(a1, a2, pl) - downsample both a1 and a2; b is then a 2x1 | |
10764 vector. | |
10765 | |
10766 PARAMETERS: 'factor' - decimation factor [default: 1] | |
10767 'offset' - sample offset for decimation [default: 0] | |
10768 | |
10769 EXAMPLES: 1) downsample x4; offset is set to default of 0 | |
10770 | |
10771 >> p = plist('factor',4); | |
10772 >> b = downsample(a, p); | |
10773 | |
10774 2) downsample x2 with 1 sample offset | |
10775 | |
10776 >> p = plist('factor',2,'offset',1); | |
10777 >> b = downsample(a,p); | |
10778 | |
10779 M-FILE INFO: Get information about this methods by calling | |
10780 >> ao.getInfo('downsample') | |
10781 | |
10782 Get information about a specified set-plist by calling: | |
10783 >> ao.getInfo('downsample', 'None') | |
10784 | |
10785 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
10786 | |
10787 HISTORY: 14-05-07 M Hewitson | |
10788 Creation | |
10789 | |
10790 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10791 </HelpText> | |
10792 <sets> | |
10793 <set name="Default"/> | |
10794 </sets> | |
10795 <plists> | |
10796 <plist name="none"> | |
10797 <param> | |
10798 <key>FACTOR</key> | |
10799 <val>2</val> | |
10800 <type>double</type> | |
10801 </param> | |
10802 <param> | |
10803 <key>OFFSET</key> | |
10804 <val>1</val> | |
10805 <type>double</type> | |
10806 </param> | |
10807 </plist> | |
10808 </plists> | |
10809 </LTPDAalgorithm> | |
10810 <plist name="none"> | |
10811 <param> | |
10812 <key>FACTOR</key> | |
10813 <val>2</val> | |
10814 <type>double</type> | |
10815 </param> | |
10816 <param> | |
10817 <key>OFFSET</key> | |
10818 <val>1</val> | |
10819 <type>double</type> | |
10820 </param> | |
10821 </plist> | |
10822 <port number="0" terminal="" type="output"> | |
10823 <node> | |
10824 <pipe color="-3657166" dstblock="New Block_1_1" dstport="1" srcblock="New Block_1" thickness="2.5"/> | |
10825 </node> | |
10826 </port> | |
10827 </block> | |
10828 <block bounds="271 147 52 71" inputs="4" name="New Block_1_1" outputs="1"> | |
10829 <LTPDAalgorithm mcategory="Output" mclass="ao" mname="iplot" mpackage="" mversion="" portdims="1 10 1 10"> | |
10830 <HelpText> IPLOT provides an intelligent plotting tool for LTPDA. | |
10831 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10832 | |
10833 DESCRIPTION: IPLOT provides an intelligent plotting tool for LTPDA. | |
10834 | |
10835 CALL: hfig = iplot (a,pl) | |
10836 [hfig, hax] = iplot (a,pl) | |
10837 [hfig, hax, hli] = iplot (a,pl) | |
10838 | |
10839 INPUTS: pl - a parameter list | |
10840 a - input analysis object | |
10841 | |
10842 OUTPUTS: hfig - handles to figures | |
10843 hax - handles to axes | |
10844 hli - handles to lines | |
10845 | |
10846 | |
10847 Plot parameters: | |
10848 | |
10849 'Arrangement' - select the plot layout: | |
10850 'single' - plots all AOs on individual figures | |
10851 'stacked' - plots all AOs on the same axes [default] | |
10852 'subplots' - plots all AOs on subplots | |
10853 | |
10854 'Function' - specify the plot function: | |
10855 'plot', 'stairs', 'stem' | |
10856 [default: 'plot'] | |
10857 *** doesn't work for xyzdata AOs | |
10858 | |
10859 Line parameters: | |
10860 | |
10861 The following properties take cell array values. If the length of | |
10862 the cell array is shorter than the number of lines to plot, the | |
10863 remaining lines will be plotted with the default options. If the | |
10864 cell array is of length 2 and the first cell contains the string | |
10865 'all', then the second cell is used to set the propery of all | |
10866 lines. | |
10867 | |
10868 'LineColors' - a cell array of color definitions for each line. | |
10869 | |
10870 'LineStyles' - a cell array of line styles. | |
10871 | |
10872 'Markers' - a cell array of markers. | |
10873 | |
10874 'LineWidths' - a cell array of line widths. If the length of the | |
10875 cell array is shorter than the number of lines to | |
10876 plot, the remaining lines will be plotted with | |
10877 the default line width. | |
10878 | |
10879 Axes parameters: | |
10880 | |
10881 'Legends' - specify a cell array of strings to be used for | |
10882 the plot legends. If a cell contains an empty | |
10883 string, the default legend string is built. | |
10884 If a single string 'off' is given instead of a | |
10885 cell array, then the legends are all switched | |
10886 off. | |
10887 | |
10888 'XLabels' - Specify the labels to be used on the x-axes. The | |
10889 units are added from the data object 'xunits' | |
10890 property. | |
10891 | |
10892 'YLabels' - Specify the labels to be used on the y-axes. The | |
10893 units are added from the data object 'yunits' | |
10894 property. If the object contains complex data, | |
10895 you should specify two y-labels for that object. | |
10896 | |
10897 The following axis properties also work with the 'all' keyword as | |
10898 described above in the line properties section. | |
10899 | |
10900 'XScales' - Specify the scales to be used on the x-axes. | |
10901 | |
10902 'YScales' - Specify the scales to the used on the y-axes. If | |
10903 an object contains complex data, you should | |
10904 specify two y-labels for that object. | |
10905 | |
10906 'XRanges' - Specify the ranges to be displayed on the x-axes. | |
10907 | |
10908 'YRanges' - Specify the ranges to the displayed on the | |
10909 y-axes. | |
10910 | |
10911 Error parameters: If you give more than one input AO then you must | |
10912 specify the following parameter values in a cell-array, | |
10913 one cell for each input AO. Leave the cell empty to | |
10914 plot no errors. Each error can be a value or a vector | |
10915 the same length as the data vector. If you give and | |
10916 upper limit but not lower limit, then the errors are | |
10917 assumed to be symmetric (and vice versa) | |
10918 | |
10919 'XerrL' - lower bound error values for the X data points. | |
10920 'XerrU' - upper bound error values for the X data points. | |
10921 'YerrL' - lower bound error values for the Y data points. | |
10922 'YerrU' - upper bound error values for the Y data points. | |
10923 | |
10924 Math operations: You can specify rudimentary math operations to be | |
10925 performed on the X and Y data prior to plotting. The | |
10926 'all' keyword is also supported by these parameters. | |
10927 | |
10928 'Xmaths' - specify math operations to perform on the | |
10929 data vector 'x'. For example, | |
10930 plist('Xmaths', 'abs(x)'). | |
10931 | |
10932 'Ymaths' - specify math operations to perform on the | |
10933 data vector 'y'. For example, | |
10934 plist('Ymaths', 'sqrt(y)'). | |
10935 | |
10936 Time-series parameters: in addition to the general options, time-series | |
10937 objects have the following additional parameters. | |
10938 | |
10939 'Xunits' - specify the units on the x-axis as | |
10940 'us' - microseconds | |
10941 'ms' - milliseconds | |
10942 's' - seconds [default] | |
10943 'm' - minutes | |
10944 'h' - hours | |
10945 'D' - days | |
10946 'M' - months | |
10947 'HH:MM:SS' - using a date/time format | |
10948 recognized by datetic (help datetic) | |
10949 | |
10950 | |
10951 Frequency-series parameters: | |
10952 | |
10953 'complexPlotType' - specify how to plot complex data. | |
10954 Choose from: | |
10955 - 'realimag' | |
10956 - 'absdeg' | |
10957 - 'absrad' | |
10958 | |
10959 EXAMPLES: | |
10960 | |
10961 1) Plot two time-series AOs with different colors, line styles, and widths | |
10962 | |
10963 pl = plist('Linecolors', {'g', 'k'}, 'LineStyles', {'', '--'}, 'LineWidths', {1, 4}); | |
10964 iplot(tsao1, tsao2, pl); | |
10965 | |
10966 2) Plot two time-series AOs in subplots. Also override the second legend | |
10967 text and the first line style. | |
10968 | |
10969 pl = plist('Arrangement', 'subplots', 'LineStyles', {'--'}, 'Legends', {'', 'My Sine Wave'}); | |
10970 iplot(tsao1, tsao2, pl); | |
10971 | |
10972 3) Plot two time-series AOs taking the square of the y-values of the | |
10973 first AO and the log of the x-values of the second AO. | |
10974 | |
10975 pl = plist('Arrangement', 'subplots', 'YMaths', 'y.^2', 'XMaths', {'', 'log(x)'}); | |
10976 iplot(tsao1, tsao2, pl); | |
10977 | |
10978 4) Plot two frequency-series AOs on subplots with the same Y-scales and | |
10979 Y-ranges | |
10980 | |
10981 pl1 = plist('Yscales', {'All', 'lin'}); | |
10982 pl2 = plist('arrangement', 'subplots', 'YRanges', {'All', [1e-6 100]}); | |
10983 iplot(fsd1, fsd2, pl1, pl2) | |
10984 | |
10985 | |
10986 M-FILE INFO: Get information about this methods by calling | |
10987 >> ao.getInfo('iplot') | |
10988 | |
10989 Get information about a specified set-plist by calling: | |
10990 >> ao.getInfo('iplot', 'None') | |
10991 | |
10992 VERSION: $Id: example_1.lwb,v 1.1 2009/01/13 12:39:16 hewitson Exp $ | |
10993 | |
10994 HISTORY: 22-12-07 M Hewitson | |
10995 Creation | |
10996 | |
10997 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
10998 </HelpText> | |
10999 <sets> | |
11000 <set name="Time-series plot"/> | |
11001 <set name="Frequency-series plot"/> | |
11002 <set name="Y data plot"/> | |
11003 <set name="X-Y data plot"/> | |
11004 <set name="3D plot"/> | |
11005 </sets> | |
11006 <plists> | |
11007 <plist name="none"> | |
11008 <param> | |
11009 <key>COLORS</key> | |
11010 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
11011 <type>cell</type> | |
11012 </param> | |
11013 <param> | |
11014 <key>ARRANGEMENT</key> | |
11015 <val>stacked</val> | |
11016 <type>char</type> | |
11017 </param> | |
11018 <param> | |
11019 <key>FUNCTION</key> | |
11020 <val>plot</val> | |
11021 <type>char</type> | |
11022 </param> | |
11023 <param> | |
11024 <key>LEGENDLOCATION</key> | |
11025 <val>NorthEast</val> | |
11026 <type>char</type> | |
11027 </param> | |
11028 <param> | |
11029 <key>XERRL</key> | |
11030 <val>[]</val> | |
11031 <type>double</type> | |
11032 </param> | |
11033 <param> | |
11034 <key>XERRU</key> | |
11035 <val>[]</val> | |
11036 <type>double</type> | |
11037 </param> | |
11038 <param> | |
11039 <key>YERRU</key> | |
11040 <val>[]</val> | |
11041 <type>double</type> | |
11042 </param> | |
11043 <param> | |
11044 <key>YERRL</key> | |
11045 <val>[]</val> | |
11046 <type>double</type> | |
11047 </param> | |
11048 <param> | |
11049 <key>XLABEL</key> | |
11050 <val>Time</val> | |
11051 <type>char</type> | |
11052 </param> | |
11053 <param> | |
11054 <key>YLABEL</key> | |
11055 <val>Amplitude</val> | |
11056 <type>char</type> | |
11057 </param> | |
11058 </plist> | |
11059 <plist name="none"> | |
11060 <param> | |
11061 <key>COLORS</key> | |
11062 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
11063 <type>cell</type> | |
11064 </param> | |
11065 <param> | |
11066 <key>ARRANGEMENT</key> | |
11067 <val>stacked</val> | |
11068 <type>char</type> | |
11069 </param> | |
11070 <param> | |
11071 <key>FUNCTION</key> | |
11072 <val>plot</val> | |
11073 <type>char</type> | |
11074 </param> | |
11075 <param> | |
11076 <key>LEGENDLOCATION</key> | |
11077 <val>NorthEast</val> | |
11078 <type>char</type> | |
11079 </param> | |
11080 <param> | |
11081 <key>XERRL</key> | |
11082 <val>[]</val> | |
11083 <type>double</type> | |
11084 </param> | |
11085 <param> | |
11086 <key>XERRU</key> | |
11087 <val>[]</val> | |
11088 <type>double</type> | |
11089 </param> | |
11090 <param> | |
11091 <key>YERRU</key> | |
11092 <val>[]</val> | |
11093 <type>double</type> | |
11094 </param> | |
11095 <param> | |
11096 <key>YERRL</key> | |
11097 <val>[]</val> | |
11098 <type>double</type> | |
11099 </param> | |
11100 <param> | |
11101 <key>COMPLEXPLOTTYPE</key> | |
11102 <val>absdeg</val> | |
11103 <type>char</type> | |
11104 </param> | |
11105 <param> | |
11106 <key>XLABEL</key> | |
11107 <val>Frequency</val> | |
11108 <type>char</type> | |
11109 </param> | |
11110 </plist> | |
11111 <plist name="none"> | |
11112 <param> | |
11113 <key>COLORS</key> | |
11114 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
11115 <type>cell</type> | |
11116 </param> | |
11117 <param> | |
11118 <key>ARRANGEMENT</key> | |
11119 <val>stacked</val> | |
11120 <type>char</type> | |
11121 </param> | |
11122 <param> | |
11123 <key>FUNCTION</key> | |
11124 <val>plot</val> | |
11125 <type>char</type> | |
11126 </param> | |
11127 <param> | |
11128 <key>LEGENDLOCATION</key> | |
11129 <val>NorthEast</val> | |
11130 <type>char</type> | |
11131 </param> | |
11132 <param> | |
11133 <key>XERRL</key> | |
11134 <val>[]</val> | |
11135 <type>double</type> | |
11136 </param> | |
11137 <param> | |
11138 <key>XERRU</key> | |
11139 <val>[]</val> | |
11140 <type>double</type> | |
11141 </param> | |
11142 <param> | |
11143 <key>YERRU</key> | |
11144 <val>[]</val> | |
11145 <type>double</type> | |
11146 </param> | |
11147 <param> | |
11148 <key>YERRL</key> | |
11149 <val>[]</val> | |
11150 <type>double</type> | |
11151 </param> | |
11152 <param> | |
11153 <key>XLABEL</key> | |
11154 <val>Sample</val> | |
11155 <type>char</type> | |
11156 </param> | |
11157 <param> | |
11158 <key>YLABEL</key> | |
11159 <val>Value</val> | |
11160 <type>char</type> | |
11161 </param> | |
11162 </plist> | |
11163 <plist name="none"> | |
11164 <param> | |
11165 <key>COLORS</key> | |
11166 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
11167 <type>cell</type> | |
11168 </param> | |
11169 <param> | |
11170 <key>ARRANGEMENT</key> | |
11171 <val>stacked</val> | |
11172 <type>char</type> | |
11173 </param> | |
11174 <param> | |
11175 <key>FUNCTION</key> | |
11176 <val>plot</val> | |
11177 <type>char</type> | |
11178 </param> | |
11179 <param> | |
11180 <key>LEGENDLOCATION</key> | |
11181 <val>NorthEast</val> | |
11182 <type>char</type> | |
11183 </param> | |
11184 <param> | |
11185 <key>XERRL</key> | |
11186 <val>[]</val> | |
11187 <type>double</type> | |
11188 </param> | |
11189 <param> | |
11190 <key>XERRU</key> | |
11191 <val>[]</val> | |
11192 <type>double</type> | |
11193 </param> | |
11194 <param> | |
11195 <key>YERRU</key> | |
11196 <val>[]</val> | |
11197 <type>double</type> | |
11198 </param> | |
11199 <param> | |
11200 <key>YERRL</key> | |
11201 <val>[]</val> | |
11202 <type>double</type> | |
11203 </param> | |
11204 <param> | |
11205 <key>XLABEL</key> | |
11206 <val>X-data</val> | |
11207 <type>char</type> | |
11208 </param> | |
11209 <param> | |
11210 <key>YLABEL</key> | |
11211 <val>Y-data</val> | |
11212 <type>char</type> | |
11213 </param> | |
11214 <param> | |
11215 <key>YMATHS</key> | |
11216 <val/> | |
11217 <type>char</type> | |
11218 </param> | |
11219 <param> | |
11220 <key>XMATHS</key> | |
11221 <val/> | |
11222 <type>char</type> | |
11223 </param> | |
11224 </plist> | |
11225 <plist name="none"> | |
11226 <param> | |
11227 <key>COLORS</key> | |
11228 <val>{[0.80000000000000004 0.20000000000000001 0.20000000000000001],[0.20000000000000001 0.20000000000000001 0.80000000000000004],[0.20000000000000001 0.90000000000000002 0.20000000000000001],[0.37 0.90000000000000002 0.82999999999999996],[0.88800000000000001 0.16300000000000001 0.90000000000000002],[0 0 0],[0 0.81176470588235294 1],[1 0.50196078431372548 0],[0.5607843137254902 0 0],[1 0.81176470588235294 0],[0.90000000000000002 0.26600000000000001 0.59299999999999997]}</val> | |
11229 <type>cell</type> | |
11230 </param> | |
11231 <param> | |
11232 <key>ARRANGEMENT</key> | |
11233 <val>single</val> | |
11234 <type>char</type> | |
11235 </param> | |
11236 <param> | |
11237 <key>XLABEL</key> | |
11238 <val>Time</val> | |
11239 <type>char</type> | |
11240 </param> | |
11241 <param> | |
11242 <key>YLABEL</key> | |
11243 <val>Frequency</val> | |
11244 <type>char</type> | |
11245 </param> | |
11246 <param> | |
11247 <key>ZLABEL</key> | |
11248 <val>Amplitude</val> | |
11249 <type>char</type> | |
11250 </param> | |
11251 <param> | |
11252 <key>YMATHS</key> | |
11253 <val/> | |
11254 <type>char</type> | |
11255 </param> | |
11256 <param> | |
11257 <key>ZMATHS</key> | |
11258 <val/> | |
11259 <type>char</type> | |
11260 </param> | |
11261 <param> | |
11262 <key>XMATHS</key> | |
11263 <val/> | |
11264 <type>char</type> | |
11265 </param> | |
11266 </plist> | |
11267 </plists> | |
11268 </LTPDAalgorithm> | |
11269 <plist name="none"> | |
11270 <param> | |
11271 <key>Markers</key> | |
11272 <val>{'x', 'o', 's'}</val> | |
11273 <type>Char</type> | |
11274 </param> | |
11275 </plist> | |
11276 <port number="0" terminal="" type="output"/> | |
11277 </block> | |
11278 </document> | |
11279 </LTPDAworkbench> |