0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % AO analysis object class constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 % DESCRIPTION: AO analysis object class constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % Create an analysis object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 % Possible constructors:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % a = ao() - creates an empty analysis object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % a = ao('a1.xml') - creates a new AO by loading a file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % a = ao('a1.mat')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % a = ao('a1.mat') - creates a new AO by loading the 2-column data .MAT file.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 % a = ao('file.txt') - creates a new AO by loading the data.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % a = ao('file.dat')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 % a = ao('file',pl) (<a href="matlab:utils.helper.displayMethodInfo('ao', 'ao')">Set: From ASCII File</a>)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 % a = ao(data) - creates an AO with a data object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 % a = ao(constant) - creates an AO from a constant
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % a = ao(specwin) - creates an AO from a specwin object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18 % a = ao(pzm) - creates an AO from a pole/zero model object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 % a = ao(pzm,nsecs,fs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 % a = ao(smodel) - creates an AO from a symbolic model object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 % a = ao(pest) - creates an AO from a parameter estimates object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 % a = ao(x,y) - creates an AO with xy data
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 % a = ao(y, fs) - creates an AO with time-series data
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 % a = ao(x,y,fs) - creates an AO with time-series data
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 % a = ao(x,y,pl) - creates an AO depending from the PLIST (<a href="matlab:utils.helper.displayMethodInfo('ao', 'ao')">Set: From XY Values</a>).
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 % a = ao(plist) - creates an AO from a <a href="matlab:utils.helper.displayMethodInfo('ao', 'ao')">parameter list</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 % <a href="matlab:utils.helper.displayConstructorExamples('ao')">Examples</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 % <a href="matlab:utils.helper.displayMethodInfo('ao', 'ao')">Parameters Description</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 %
|
43
|
32 % VERSION: $Id: ao.m,v 1.362 2011/12/01 08:30:52 hewitson Exp $
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 % AO analysis object class constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 % DESCRIPTION: AO analysis object class constructor.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 % Create an analysis object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 % Possible constructors:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 % a = ao() - creates an empty analysis object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 % a = ao('a1.xml') - creates a new analysis object by loading the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 % analysis object from disk.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 % a = ao('a1.mat') - creates a new analysis object by loading the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 % analysis object from disk.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 % a = ao('a1.mat') - creates a new analysis object by loading the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 % 2-column data set stored in the .MAT file.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 % a = ao('file.txt') - creates a new analysis object by loading the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 % a = ao('file.dat') data in 'file.txt'. The ascii file is assumed
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 % to be an equally sampled two-column file of
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 % time and amplitude. By default, the amplitude
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 % units are taken to be Volts ('V') and the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 % time samples are assumed to be in seconds.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 % a = ao('file',pl) - creates a new analysis object by loading the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 % data in 'file'. The parameter list decide how the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 % analysis object is created. The valid key values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 % of the parameter list are:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 % 'type' 'tsdata','fsdata','xydata'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 % [default: 'tsdata']
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 % 'fs' if this value is set, the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 % x-axes is computed by the fs value.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 % [default: empty array]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 % 'columns' [1 2 1 4]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 % Each pair represented the x- and y-axes.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 % (Each column pair creates an analysis object)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 % If the value 'fs' is used then
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 % represent each column the y-axes.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 % (Each column creates an analysis object)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 % [default: [1] ]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 % 'comment_char' The comment character in the file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 % [default: '']
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 % 'description' To set the description in the analysis object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 % '...' every property where exist a public
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 % set-function in the AO class e.g.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 % setName, setT0, setYunits, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 % If the constructor creates multiple ao's it is
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % possible to give each data class its own e.g.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 % 'name'. In this case the parameter list with the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 % key 'name' must have cell of the different values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 % as the name of the different data objects. e.g.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 % pl = plist('columns', [1 2 1 3], ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 % 'name', {'name1' 'name2'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 % 'xunits', unit('s'), ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 % 'yunits', {unit('V') unit('Hz'}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 % This parameter list creates two ao's with tsdata.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 % 'Robust' - set this to 'yes' to use (slow)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 % robust data reading. Useful for
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 % complicated file formats.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 % [default: 'yes']
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 % NOTE: Data files with comments at the end of the lines can only be
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 % read if there are no lines with only comments. In this case, do not
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 % specify a comment character. If you really want to load a file like
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 % this, specify the 'Robust' option; this will be very slow for large
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 % files.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 % a = ao(data) - creates an analysis object with a data
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 % object. Data object can be one of tsdata,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 % fsdata, cdata, xydata, xyzdata.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 % a = ao(data, hist) - creates an analysis object with a data
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 % object and a history object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 % a = ao(specwin) - creates an analysis object from a specwin
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 % object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 % a = ao(plist) - creates an analysis object from the description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 % given in the parameter list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 %
|
43
|
113 % VERSION: $Id: ao.m,v 1.362 2011/12/01 08:30:52 hewitson Exp $
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 % Parameter sets for plist constructor (in order of priority):
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 % Notes and examples for some parameter sets follow:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 % From complex ASCII File
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 % ---------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 % >> ao(plist('filename','data.txt','complex_type','real/imag','type','tsdata')); %!
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 % >> ao(plist('filename','data.txt','complex_type','real/imag','type','fsdata','columns',[1,2,4])); %!
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 % From Function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 % -------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 % >> ao(plist('fcn', 'randn(100,1)','yunits','V'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 % From Values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 % -----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133 % >> ao(plist('vals',[1 2 3],'N',10)); % --> cdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 % >> ao(plist('xvals',[1 2 3],'yvals',[10 20 30])); % --> xydata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 % >> ao(plist('xvals',[1 2 3],'yvals',[10 20 30],'type','tsdata')); % --> tsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 % >> ao(plist('xvals',[1 2 3],'yvals',[10 20 30],'type','fsdata')); % --> fsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 % >> ao(plist('fs',1,'yvals',[10 20 30])); % --> tsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 % >> ao(plist('fs',1,'yvals',[10 20 30],'type','fsdata')); % --> fsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 % >> ao(plist('fs',1,'yvals',[10 20 30],'type','fsdata','xunits','mHz','yunits','V'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 % From XY Function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 % ----------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 % >> ao(plist('xyfcn', 'cos(2*pi*x) + randn(size(x))','x',[1:1e5]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 % From Time-series Function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 % -------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 % >> ao(plist('tsfcn', 'cos(pi*t) + randn(size(t))', 'fs', 1, 'nsecs', 100));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 % >> ao(plist('fs',10,'nsecs',10,'tsfcn','sin(2*pi*1.4*t)+0.1*randn(size(t))','t0',time('1980-12-01 12:43:12')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153 % From Frequency-series Function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 % ------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 % >> ao(plist('FSFCN','f','f1',1e-5,'f2',1,'yunits','V'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 % >> ao(plist('FSFCN','f','f',[0.01:0.01:1]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 % From Window
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 % -----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 % >> ao(plist('win', specwin('Hannning', 100)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 % From Waveform
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165 % -------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 % >> ao(plist('waveform','sine wave','A',3,'f',1,'phi',pi/2,'toff',0.1,'nsecs',10,'fs',100));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 % >> ao(plist('waveform','noise','type','normal','sigma',2,'nsecs',1000,'fs',1));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 % >> ao(plist('waveform','chirp','f0',0.1,'f1',1,'t1',1,'nsecs',5,'fs',1000));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 % >> ao(plist('waveform','gaussian pulse','f0',1','bw',0.2,'nsecs',20,'fs',10));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 % >> ao(plist('waveform','square wave','f',2,'duty',40,'nsecs',10,'fs',100));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 % >> ao(plist('waveform','sawtooth','f',1.23,'width',1,'nsecs',10/1.23,'fs',50));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 % From Repository
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 % ---------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 % >> ao(plist('hostname','123.123.123.123','database','ltpda_test','ID',[1:10],'binary','yes')); %!
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 % From Polynomial
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 % ---------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 % Construct an AO from a set of polynomial coefficients.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 % 'polyval' - a set of polynomial coefficients. This can also be an AO,
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 % in which case the Y values from the AO are used.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 % [default: [-0.0001 0.02 -1 -1] ]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 % Additional parameters:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 % 'Nsecs' - number of seconds [default: 10]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 % 'fs' - sample rate [default: 10]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 % or
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 % 't' - vector of time vertices. The value can also
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 % be an AO, in which case the X vector is used.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 % [default: [] ]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 % Example:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 % plist('polyval', [1 2 3], 'Nsecs', 1e2, 'fs', 10)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 % From Pzmodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 % ------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 % Generates an ao with a timeseries with a prescribed spectrum.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 % 'pzmodel' - a pole/zero model which builds the time-series AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 % Additional parameters:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 % 'Nsecs' - number of seconds to be generated
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 % 'fs' - sampling frequency
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 % You can also specify optional parameters:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 % 'xunits' - unit of the x-axis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 % 'yunits' - unit of the y-axis
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 % Example: p = [pz(f1,q1) pz(f2,q2)]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 % z = [pz(f3,q3)]
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 % pzm = pzmodel(gain, p, z)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 % plist('pzmodel', pzm, 'Nsecs', 1e2, 'Fs', 10)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 % From Built-in Model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 % -------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 % To get a list of built-in AOs: ao.getBuiltInModels
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 % Each model has additional parameters that need to be passed. To see the
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 % Additonal model parameters: >> help ao_model_<model_name>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 % Example: >> help ao_model_mdc1_fd_dynamics
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 % From Plist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 % ----------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 % Examples:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 % 1) Normally distributed random noise time-series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 % >> p = plist('waveform', 'noise', 'fs', 10, 'nsecs', 1000);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 % >> a = ao(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243 % Indexing:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 % >> b = a(1); % where a is an array of analysis objects
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 % >> d = a.data; % get the data object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 % >> h = a.hist; % get the history object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 % >> d = a.data.x(1:20); % get a matrix of data values x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 % 2) Timeseries with a prescribed spectrum
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 % >> a = ao(plist('pzmodel', pzm, 'fs',10, 'nsecs', 120, 'ndigits', 50)); %!
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254 % fs - sampling frequency
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 % nsecs - number of seconds in time series
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 % ndigits - number of digits for symbolic math toolbox (default: 32)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 % <a href="matlab:utils.helper.displayMethodInfo('ao', 'ao')">Parameters Description</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 % See also tsdata, fsdata, xydata, cdata, xyzdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 % From CSD
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 % ------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 % Example 1D: mod is an AO with the target model power spectrum
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 % pl = plist('csd', mod, 'Nsecs', 1e3, 'fs', 10);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 % an = ao(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 % Example 2D: mod is a 2x2 matrix of AOs with the target model cross
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 % spectral density.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 % pl = plist('csd', mod, 'Nsecs', 1e3, 'fs', 10);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 % an = ao(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 classdef ao < ltpda_uoh
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 %------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 %-------- Public (read/write) Properties -------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 %------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 properties (Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 end % End (read/write) Properties
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 %------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 %---------- Private read-only Properties --------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 %------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 properties (GetAccess = public, SetAccess = protected)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 data = []; % Data object associated with this AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 end % End read only properties
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 % Check property setting %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 function set.data(obj, val)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 if ~(isa(val, 'ltpda_data') || isempty(val))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 error('### The value for the property ''data'' must be a ltpda_data object');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 obj.data = val;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 %------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 %---------------- Private Properties ------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 %------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 properties (GetAccess = protected, SetAccess = protected)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 % Constructor %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 function obj = ao(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 import utils.const.*
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 utils.helper.msg(msg.PROC3, 'running ao/ao');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 % check if the caller was a user of another method
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 callerIsMethod = utils.helper.callerIsMethod;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 % Check the supported version
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 utils.helper.checkMatlabVersion;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 %%% Collect all plists and combine them.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 [pli, invars, args] = utils.helper.collect_objects(varargin, 'plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 if ~isempty(pli)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 pli = pli.combine();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 if ~isempty(pli.find('dtype'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 warning('LTPDA:ao', 'the parameter name ''dtype'' is now deprecated; please use ''type'' instead.')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 pli.append('type',pli.find('dtype'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 pli.remove('dtype');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 if ~isempty(pli.find('use_fs'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 warning('LTPDA:ao', 'the parameter name ''use_fs'' is now deprecated; please use ''fs'' instead.')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 pli.append('fs',pli.find('use_fs'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 pli.remove('use_fs');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 %%% Append the plist to the input-arguments
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 args{end+1} = pli;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 %%% Execute appropriate constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 switch numel(args)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 case 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 %%%%%%%%%%%%%%%%%%%%%%%%%%% no input %%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 obj.addHistory(ao.getInfo('ao', 'None'), plist(), [], []);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 case 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 %%%%%%%%%%%%%%%%%%%%%%%%%%% one input %%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 if ischar(args{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 %%%%%%%%%% a1 = ao('foo.mat') %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 %%%%%%%%%% a1 = ao('foo.xml') %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 %%%%%%%%%% a1 = ao('foo.txt') %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369 %%%%%%%%%% a1 = ao('foo.dat') %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 utils.helper.msg(msg.OPROC1, 'constructing from file %s', varargin{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 obj = fromFile(obj, args{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 elseif isa(args{1}, 'ao')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 %%%%%%%%%% a1 = ao(ao) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 utils.helper.msg(msg.PROC1, 'copying %s', args{1}.name);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 obj = copy(args{1},1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 for kk = 1:numel(args{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 obj(kk).addHistory(ao.getInfo('ao', 'None'), [], [], obj(kk).hist);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 elseif isstruct(args{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382 %%%%%%%%%% a1 = ao(struct) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 utils.helper.msg(msg.PROC1, 'constructing from struct');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 obj = fromStruct(obj, varargin{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 elseif isnumeric(args{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 %%%%%%%%%% a1 = ao(constant) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 %%%%%%%%%% a1 = ao([1 2; 3 4]) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 utils.helper.msg(msg.PROC3, 'constructing from values');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 obj = fromVals(obj, plist('VALS', args{1}), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 elseif isa(args{1}, 'pzmodel')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 %%%%%%%%% ao(pzmodel) %%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395 obj = obj.fromPzmodel(plist('pzmodel', args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 elseif isa(args{1}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 %%%%%%%%%% a1 = ao(plist-object) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 utils.helper.msg(msg.PROC1, 'constructing from plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 pl = args{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 if pl.isparam('filename')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 %--- Construct from file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408 utils.helper.msg(msg.PROC2, 'constructing from file %s', pl.find('filename'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409 obj = fromFile(obj, args{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 elseif pl.isparam('built-in')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 %--- Construct from model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414 utils.helper.msg(msg.PROC2, 'constructing from built-in model');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 obj = obj.fromModel(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 elseif pl.isparam('fcn')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 %--- Construct from function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 utils.helper.msg(msg.PROC2, 'constructing from function %s', pl.find('fcn'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 obj = fromFcn(obj, pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 elseif pl.isparam('vals')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 %--- Construct from Values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430 utils.helper.msg(msg.PROC2, 'constructing from values');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 obj = obj.fromVals(pl, callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 elseif pl.isparam('xvals') || pl.isparam('yvals')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 %--- Construct from X and Y Values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 utils.helper.msg(msg.PROC2, 'constructing from X and Y values');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 obj = fromXYVals(obj, pl, callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 elseif pl.isparam('tsfcn')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 %--- Construct from Time-series function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 utils.helper.msg(msg.PROC2, 'constructing from fcn(t) %s', pl.find('tsfcn'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447 obj = fromTSfcn(obj, pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 elseif pl.isparam('xyfcn')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 %--- Construct from XY function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 utils.helper.msg(msg.PROC2, 'constructing from fcn(x) %s', pl.find('xyfcn'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455 obj = obj.fromXYFcn(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457 elseif pl.isparam('fsfcn')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 %--- Construct from frequency-series function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462 utils.helper.msg(msg.PROC2, 'constructing from fcn(f) %s', pl.find('fsfcn'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463 obj = obj.fromFSfcn(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465 elseif pl.isparam('win')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
467 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
468 %--- Construct from Window
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
469 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
470 utils.helper.msg(msg.PROC2, 'constructing from window %s', char(pl.find('win')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
471 obj = obj.fromSpecWin(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
472
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
473 elseif pl.isparam('waveform')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
474
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
475 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
476 %--- Construct from Waveform
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
477 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
478 utils.helper.msg(msg.PROC2, 'constructing from waveform %s', pl.find('waveform'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
479 obj = fromWaveform(obj, pl, callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
480
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
481 elseif pl.isparam('hostname') || pl.isparam('conn')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
482
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
483 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
484 %--- Construct from repository
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
485 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
486 utils.helper.msg(msg.PROC2, 'constructing from repository %s', pl.find('hostname'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
487 obj = obj.fromRepository(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
488
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
489 elseif pl.isparam('polyval')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
490
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
491 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
492 %--- Construct from polynomial
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
493 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
494 utils.helper.msg(msg.PROC2, 'constructing from polynomial ');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
495 obj = obj.fromPolyval(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
496
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
497 elseif pl.isparam('plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
498
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
499 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
500 %--- Construct from plist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
501 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
502 obj = ao(pl.find('plist'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
503
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
504 elseif pl.isparam('pzmodel')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
505
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
506 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
507 %--- Construct from pzmodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
508 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
509 utils.helper.msg(msg.PROC2, 'constructing from pzmodel %s', char(pl.find('pzmodel')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
510 obj = obj.fromPzmodel(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
511
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
512 elseif pl.isparam('model')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
513
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
514 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
515 %--- Construct from smodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
516 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
517 utils.helper.msg(msg.PROC2, 'constructing from symbolic model %s', char(pl.find('smodel')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
518 obj = obj.fromSModel(pl, callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
519
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
520 elseif pl.isparam('Pest')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
521
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
522 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
523 %--- Construct from pest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
524 %-----------------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
525 utils.helper.msg(msg.PROC2, 'constructing from pest object %s', char(pl.find('pest')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
526 obj = obj.fromPest(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
527
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
528
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
529 elseif pl.isparam('parameter')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
530
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
531 utils.helper.msg(msg.PROC2, 'constructing from parameter');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
532 obj = obj.fromParameter(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
533
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
534 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
535 % build a no-data ao from the plist and default values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
536 ii = ao.getInfo('ao', 'Default');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
537 pl = applyDefaults(ii.plists, pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
538 obj.setObjectProperties(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
539 obj.addHistory(ao.getInfo('ao', 'None'), pl, [], []);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
540 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
541
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
542 elseif isa(args{1}, 'specwin')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
543 %%%%%%%%%% a1 = ao(specwin) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
544 utils.helper.msg(msg.PROC1, 'constructing from spectral window %s', char(args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
545 obj = obj.fromSpecWin(plist('win', args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
546
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
547 elseif isa(args{1}, 'smodel')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
548 %%%%%%%%%% a1 = ao(smodel) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
549 utils.helper.msg(msg.PROC1, 'constructing from smodel %s', char(args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
550 obj = obj.fromSModel(plist('model', args{1}), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
551
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
552 elseif isa(args{1}, 'pest')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
553 %%%%%%%%%% a1 = ao(pest) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
554 utils.helper.msg(msg.PROC1, 'constructing from pest %s', char(args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
555 obj = obj.fromPest(plist('pest', args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
556
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
557 elseif isa(args{1}, 'ltpda_data')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
558 %%%%%%%%%% a1 = ao(ltpda_data-object) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
559 %%%%%%%%%% a1 = ao(cdata) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
560 %%%%%%%%%% a1 = ao(fsdata) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
561 %%%%%%%%%% a1 = ao(tsdata) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
562 %%%%%%%%%% a1 = ao(xydata) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
563 %%%%%%%%%% a1 = ao(xyzdata) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
564 utils.helper.msg(msg.PROC1, 'constructing from data object %s', class(args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
565 obj = ao;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
566 obj.data = args{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
567 obj.addHistory(ao.getInfo('ao', 'None'), [], [], []);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
568
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
569 elseif islogical(args{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
570 %%%%%%%%%%% a1 = ao(true) %%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
571 utils.helper.msg(msg.PROC3, 'constructing from logical');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
572 obj = fromVals(obj, plist('VALS', args{1}), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
573
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
574 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
575 error('### Unknown single input constructor');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
576 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
577
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
578 case 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
579 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
580 %%%%%%%%%%%%%%%%%%%%%%%%%%% two inputs %%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
581 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
582
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
583 if isa(varargin{1}, 'database') || isa(varargin{1}, 'mpipeline.repository.RepositoryConnection')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
584 %%%%%%%%%% ao(database-object, [IDs]) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
585 utils.helper.msg(msg.PROC1, 'constructing from database object');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
586 pl = plist('conn', varargin{1}, 'id', varargin{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
587 obj = obj.fromRepository(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
588
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
589 elseif isnumeric(args{1}) && isnumeric(args{2}) && numel(args{1}) == numel(args{2})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
590 %%%%%%%%%% ao(x-vector, y-vector) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
591 utils.helper.msg(msg.PROC1, 'constructing from X and Y values');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
592 obj = obj.fromXYVals(plist('XVALS', args{1}, 'YVALS', args{2}), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
593
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
594 elseif isnumeric(args{1}) && isnumeric(args{2}) && numel(args{2}) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
595 %%%%%%%%%% ao(y-vector, fs) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
596 utils.helper.msg(msg.PROC1, 'constructing from Y values and fs');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
597 obj = obj.fromXYVals(plist('YVALS', args{1}, 'fs', args{2}, 'xunits', 's'), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
598
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
599 elseif isa(args{1}, 'pzmodel') && isa(args{2}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
600 %%%%%%%%%% f = ao(pzmodel-object, plist-object) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
601 utils.helper.msg(msg.OPROC1, 'constructing from pzmodel %s', args{1}.name);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
602 obj = obj.fromPzmodel(combine(plist('pzmodel', args{1}), args{2}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
603 elseif isnumeric(args{1}) && isa(args{2}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
604 %%%%%%%%%% ao(<double>, pl) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
605 utils.helper.msg(msg.PROC1, 'constructing from constant values and plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
606 obj = obj.fromVals(combine(plist('VALS', args{1}), args{2}), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
607
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
608 elseif ischar(args{1}) && isa(args{2}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
609 %%%%%%%%%%% ao('foo.txt', pl) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
610 utils.helper.msg(msg.PROC1, 'constructing from filename and plist');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
611 pl = combine(plist('filename', args{1}), args{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
612 obj = obj.fromFile(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
613
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
614 elseif isa(args{1}, 'ao') && isa(args{2}, 'ao')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
615 %%%%%%%%%%% ao(ao-object, ao-object) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
616 % Do we have a list of AOs as input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
617 obj = ao([args{1}, args{2}]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
618
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
619 % elseif isa(args{1}, 'ao') && isa(args{2}, 'plist') && isempty(args{2}.params)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
620 % % pass to copy constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
621 % a = ao(args{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
622 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
623
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
624 elseif isa(args{1}, 'ao') && isa(args{2}, 'plist') && isempty(varargin{2}.params)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
625 %%%%%%%%%% f = ao(ao-object, <empty plist>) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
626 obj = ao(varargin{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
627
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
628 elseif isa(args{1}, 'org.apache.xerces.dom.DeferredElementImpl') && ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
629 isa(args{2}, 'history')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
630 %%%%%%%%%% obj = ao(DOM node, history-objects) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
631 obj = fromDom(obj, args{1}, args{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
632
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
633 elseif isa(args{1}, 'ltpda_uoh') && isa(args{2}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
634 %%%%%%%%%%% ao(<ltpda_uoh>-object, plist-object) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
635 % always recreate from plist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
636
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
637 % If we are trying to load from file, and the file exists, do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
638 % that. Otherwise, copy the input object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
639 if args{2}.isparam('filename')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
640 if exist(fullfile('.', find(args{2}, 'filename')), 'file')==2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
641 obj = ao(args{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
642 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
643 obj = ao(args{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
644 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
645 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
646 obj = ao(args{2});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
647 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
648 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
649 error('### Unknown constructor with two inputs');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
650 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
651
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
652 case 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
653 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
654 %%%%%%%%%%%%%%%%%%%%%%%%%% three inputs %%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
655 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
656
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
657 if isnumeric(args{1}) && isnumeric(args{2}) && isnumeric(args{3}) && ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
658 numel(args{1}) == numel(args{2}) && numel(args{3}) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
659 %%%%%%%%%% ao(x-vector, y-vector, fs) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
660
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
661 utils.helper.msg(msg.PROC1, 'constructing from X and Y values and frequency.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
662 obj = obj.fromXYVals(plist('XVALS', args{1}, 'YVALS', args{2}, 'FS', args{3}), callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
663
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
664 elseif isnumeric(args{1}) && isnumeric(args{2}) && isa(args{3}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
665 %%%%%%%%%% ao(x-vector, y-vector, plist) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
666
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
667 utils.helper.msg(msg.PROC1, 'constructing from X and Y values and frequencies.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
668 pl = combine(plist('XVALS', args{1}, 'YVALS', args{2}), args{3});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
669 obj = obj.fromXYVals(pl, callerIsMethod);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
670
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
671 elseif isa(args{1}, 'pzmodel') && isnumeric(args{2}) && isnumeric(args{3})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
672 %%%%%%%%%% ao(pzmodel, nsecs, fs) %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
673
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
674 utils.helper.msg(msg.PROC2, 'constructing from pzmodel %s', char(args{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
675 pl = plist('pzmodel', args{1}, 'Nsecs', args{2}, 'fs', args{3});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
676 obj = obj.fromPzmodel(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
677
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
678 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
679
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
680 [aoi, invars, rest] = utils.helper.collect_objects(args, 'ao');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
681
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
682 %%% Do we have a list of AOs as input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
683 if ~isempty(aoi) && isempty(rest)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
684 obj = ao(aoi);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
685 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
686 error('### Unknown constructor with three inputs');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
687 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
688 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
689
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
690 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
691 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
692 %%%%%%%%%%%%%%%%%%%%%%%%%% other inputs %%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
693 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
694
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
695 [aoi, invars, rest] = utils.helper.collect_objects(args, 'ao');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
696
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
697 %%% Do we have a list of AOs as input
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
698 if ~isempty(aoi) && isempty(rest)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
699 obj = ao(aoi);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
700 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
701 error('### Unknown number of arguments.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
702 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
703 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
704
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
705 end % End constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
706 end % End public methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
707
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
708
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
709 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
710 % Methods (static) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
711 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
712 methods (Static = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
713
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
714 function n = randn(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
715 % RANDN convenient constructor of an AO containing random numbers.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
716 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
717 % CALL:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
718 % n = ao.randn(nsamples) % cdata AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
719 % n = ao.randn(nsecs, fs) % tsdata AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
720 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
721 switch nargin
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
722 case 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
723 % cdata(nsamples)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
724 n = ao(plist('vals', randn(varargin{1},1)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
725 case 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
726 n = ao(plist('tsfcn', 'randn(size(t))', 'fs', varargin{2}, 'nsecs', varargin{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
727 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
728 error('Unknown input arguments');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
729 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
730
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
731
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
732 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
733
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
734 function n = sinewave(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
735 % SINEWAVE convenient constructor of an AO containing a sine wave.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
736 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
737 % CALL:
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
738 % n = ao.sinewave(nsecs, fs, f0, phi) % tsdata AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
739 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
740 switch nargin
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
741 case 4
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
742 n = ao(plist('waveform', 'sine wave', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
743 'f', varargin{3}, 'phi', varargin{4}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
744 'fs', varargin{2}, 'nsecs', varargin{1}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
745 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
746 error('Unknown input arguments');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
747 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
748 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
749
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
750
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
751 function mdls = getBuiltInModels(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
752 mdls = ltpda_uo.getBuiltInModels('ao');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
753 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
754
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
755 function out = SETS()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
756 out = [SETS@ltpda_uoh, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
757 {'From MAT Data File'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
758 {'From ASCII File'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
759 {'From Complex ASCII File'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
760 {'From Function'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
761 {'From Values'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
762 {'From XY Values'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
763 {'From Time-series Function'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
764 {'From XY Function'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
765 {'From Frequency-series Function'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
766 {'From Window'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
767 {'From Waveform'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
768 {'From Polynomial'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
769 {'From Pzmodel'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
770 {'From Smodel'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
771 {'From Pest'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
772 {'From Parameter'} ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
773 ];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
774 % {'From CSD'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
775 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
776
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
777 function out = VEROUT()
|
43
|
778 out = '$Id: ao.m,v 1.362 2011/12/01 08:30:52 hewitson Exp $';
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
779 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
780
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
781 function ii = getInfo(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
782 ii = utils.helper.generic_getInfo(varargin{:}, 'ao');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
783 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
784
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
785 % Return the plist for a particular parameter set
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
786 function plout = getDefaultPlist(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
787 persistent pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
788 persistent lastset;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
789 if exist('pl', 'var')==0 || isempty(pl) || ~strcmp(lastset, set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
790 pl = ao.buildplist(set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
791 lastset = set;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
792 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
793 plout = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
794 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
795
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
796 function out = buildplist(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
797
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
798 if ~utils.helper.ismember(lower(ao.SETS), lower(set))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
799 error('### Unknown set [%s]', set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
800 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
801
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
802 out = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
803 out = ao.addGlobalKeys(out);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
804 out = buildplist@ltpda_uoh(out, set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
805
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
806 % Otherwise we try to find a set for this constructor
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
807 switch lower(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
808 case 'from mat data file'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
809 % filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
810 p = param({'filename','MAT data filename.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
811 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
812
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
813 % filepath
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
814 p = param({'filepath','Path to the data file in case the filename is a relative path.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
815 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
816
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
817 % type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
818 p = param({'type','Choose the data type.'}, paramValue.DATA_TYPES);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
819 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
820
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
821 % columns
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
822 p = param({'columns', ['Specify column pairs for the <tt>x-y</tt> variables, e.g. [1 2 1 4].<br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
823 'Each column pair creates an analysis object.<br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
824 'If the value ''fs'' is set then each column represents only the <tt>y</tt>-axes.<br>']}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
825 {1, {[]}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
826 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
827
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
828 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
829 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE('s'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
830 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
831
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
832 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
833 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
834 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
835
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
836 % Fs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
837 p = param({'fs','If this value is set, the x-axes is computed from the fs value.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
838 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
839
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
840 case 'from ascii file'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
841
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
842 % filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
843 p = param({'filename','ASCII filename.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
844 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
845
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
846 % filepath
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
847 p = param({'filepath','Path to the data file in case the filename is a relative path.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
848 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
849
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
850 % type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
851 p = param({'type','Choose the data type.'}, paramValue.DATA_TYPES);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
852 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
853
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
854 % columns
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
855 p = param({'columns', ['Specify column pairs for the <tt>x-y</tt> variables, e.g. [1 2 1 4].<br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
856 'Each column pair creates an analysis object.<br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
857 'If the value ''fs'' is set then each column represents only the <tt>y</tt>-axes.<br>']}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
858 {1, {[]}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
859 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
860
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
861 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
862 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
863 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
864
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
865 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
866 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
867 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
868
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
869 % Comment char
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
870 p = param({'comment_char','The comment character in the file.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
871 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
872
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
873 % Maximum number of lines
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
874 p = param({'maxlines', 'Maximum number of lines which should be read.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
875 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
876
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
877 % Fs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
878 p = param({'fs','If this value is set, the x-axes is computed from the fs value.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
879 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
880
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
881 % Robust
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
882 p = param({'Robust',['Set this to ''yes'' to use (slow) robust data reading.<br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
883 'Useful for complicated file formats.']}, paramValue.YES_NO);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
884 p.val.setValIndex(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
885 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
886
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
887 % Delimiter
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
888 p = param({'Delimiter', 'Field delimiter character(s).'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
889 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
890
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
891 % T0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
892 p = param({'T0', ['The UTC time of the first sample.<br>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
893 'For data types other than tsdata, this is ignored.']}, {1, {'1970-01-01 00:00:00.000'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
894 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
895
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
896
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
897
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
898 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
899 %--- Read from complex ASCII file
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
900 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
901 case 'from complex ascii file'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
902
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
903 % Filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
904 p = param({'filename','ASCII filename.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
905 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
906
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
907 % filepath
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
908 p = param({'filepath','Path to the data file in case the filename is a relative path.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
909 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
910
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
911 % Complex type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
912 p = param({'complex_type','String defining the format of the complex data.'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
913 {1, {'real/imag', 'abs/deg', 'dB/deg', 'abs/rad', 'dB/rad'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
914 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
915
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
916 % Type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
917 p = param({'type','String defining the data type'}, paramValue.DATA_TYPES);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
918 p.val.setValIndex(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
919 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
920
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
921 % columns
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
922 p = param({'columns',['Colums to consider inside the file. <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
923 'It must be 3 or a multiple: the first column defines the x-axis and the next <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
924 'two columns the complex y-axis. If a multiple of 3 columns are specified, <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
925 'the constructor will output multiple aos. (e.g. [1 2 3])']}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
926 {1, {[1 2 3]}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
927 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
928
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
929 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
930 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE('Hz'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
931 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
932
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
933 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
934 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
935 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
936
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
937 % Comment char
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
938 p = param({'comment_char','The comment character in the file.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
939 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
940
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
941 % T0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
942 p = param({'T0', ['The UTC time of the first sample.<br>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
943 'For data types other than tsdata, this is ignored.']}, {1, {'1970-01-01 00:00:00.000'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
944 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
945
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
946 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
947 %--- Create from a function description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
948 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
949 case 'from function'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
950
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
951 % Fcn
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
952 p = param({'fcn','Any valid MATLAB function. [e.g. ''randn(100,1)'']'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
953 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
954
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
955 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
956 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
957 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
958
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
959 % RAND_STREAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
960 p = param({'RAND_STREAM', 'Set the random stream for noise generation. This should be a structure with the fields of the properties for the class RandStream (help RandStream).'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
961 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
962
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
963 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
964 %--- Create from a set of values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
965 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
966 case 'from values'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
967
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
968 % Vals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
969 p = param({'vals','A set of values.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
970 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
971
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
972 % N
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
973 p = param({'N','Repeat ''N'' times.'}, {1, {1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
974 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
975
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
976 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
977 p = param({'yunits','Unit on Y axis'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
978 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
979
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
980 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
981 %--- Create from a set of values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
982 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
983 case 'from xy values'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
984
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
985 % Type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
986 p = param({'type','The data type.'}, {1, {'', 'tsdata', 'fsdata', 'xydata', 'cdata'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
987 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
988
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
989 % Fs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
990 p = param({'fs',['Frequency: if this is set, xvals (if passed) will be ignored and the <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
991 'resulting tsdata will contain an X vector sampled according to fs. <br>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
992 'For data types other than tsdata, this is ignored.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
993 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
994
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
995 % T0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
996 p = param({'T0', ['The UTC time of the first sample.<br>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
997 'For data types other than tsdata, this is ignored.']}, {1, {'1970-01-01 00:00:00.000'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
998 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
999
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1000 % toffset
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1001 p = param({'toffset', ['The offset between the first x sample and t0.<br>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1002 'For data types other than tsdata, this is ignored.']}, paramValue.DOUBLE_VALUE(0));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1003 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1004
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1005 % Xvals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1006 p = param({'xvals','A set of x values.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1007 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1008
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1009 % Yvals
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1010 p = param({'yvals','A set of y values.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1011 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1012
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1013 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1014 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1015 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1016
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1017 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1018 p = param({'yunits','Unit on Y axis'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1019 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1020
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1021 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1022 %--- Create from a XY function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1023 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1024 case 'from xy function'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1025
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1026 % XY fcn
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1027 p = param({'xyfcn','Specify a function of x. (e.g. x.^2)'}, {1, {'x'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1028 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1029
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1030 % X
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1031 p = param({'X','The x values.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1032 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1033
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1034 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1035 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1036 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1037
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1038 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1039 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1040 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1041
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1042 % RAND_STREAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1043 p = param({'RAND_STREAM', 'Set the random stream for noise generation. This should be a structure with the fields of the properties for the class RandStream (help RandStream).'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1044 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1045
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1046 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1047 %--- Create from a time-series function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1048 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1049 case 'from time-series function'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1050
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1051 % TS fcn
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1052 p = param({'tsfcn','A function of time.'}, {1, {'t'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1053 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1054
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1055 % Fs, Nsecs, Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1056 out.append(plist.TSDATA_PLIST);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1057
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1058 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1059 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1060 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1061
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1062 % RAND_STREAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1063 p = param({'RAND_STREAM', 'Set the random stream for noise generation. This should be a structure with the fields of the properties for the class RandStream (help RandStream).'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1064 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1065
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1066 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1067 %--- Create from frequency-series function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1068 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1069 case 'from frequency-series function'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1070
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1071 % FS fcn
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1072 p = param({'fsfcn','A function of frequency.'}, {1, {'f'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1073 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1074
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1075 % F1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1076 p = param({'f1','The initial frequency.'}, {1, {1e-9}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1077 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1078
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1079 % F2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1080 p = param({'f2','The final frequency.'}, {1, {10000}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1081 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1082
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1083 % Nf
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1084 p = param({'nf','The number of frequency samples.'}, {1, {1000}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1085 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1086
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1087 % Scale
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1088 p = param({'scale','Choose the frequency spacing.'}, {2, {'lin', 'log'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1089 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1090
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1091 % F
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1092 p = param({'f','a vector of frequencies on which to evaluate the function.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1093 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1094
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1095 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1096 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE('Hz'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1097 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1098
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1099 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1100 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1101 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1102
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1103 % RAND_STREAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1104 p = param({'RAND_STREAM', 'Set the random stream for noise generation. This should be a structure with the fields of the properties for the class RandStream (help RandStream).'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1105 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1106
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1107 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1108 %--- Create from a window function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1109 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1110 case 'from window'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1111 % Win
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1112 p = param({'win','A Spectral window name.'}, paramValue.WINDOW);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1113 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1114
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1115 % length
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1116 p = param({'length','The length of the window (number of samples).'}, paramValue.DOUBLE_VALUE(100));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1117 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1118
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1119 % psll
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1120 p = param({'psll','If you choose a ''kaiser'' window, you can also specify the peak-sidelobe-level.'}, paramValue.DOUBLE_VALUE(150));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1121 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1122
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1123 % level order
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1124 p = param({'levelOrder','If you choose a ''levelledHanning'' window, you can also specify the order of the contraction.'}, paramValue.DOUBLE_VALUE(2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1125 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1126
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1127 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1128 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1129 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1130
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1131 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1132 %--- Create from a set of polynomial coefficients
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1133 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1134 case 'from polynomial'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1135
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1136 % Polyval
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1137 p = param({'polyval',['A set of polynomial coefficients. This can also be an AO, <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1138 'in which case the Y values from the AO are used.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1139 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1140
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1141 % Fs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1142 p = param({'fs', 'The sampling frequency of the signal. [for all]'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1143 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1144
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1145 % Nsecs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1146 p = param({'nsecs', 'The number of seconds of data. [for all]'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1147 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1148
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1149 % T0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1150 p = param({'T0', 'The UTC time of the first sample. [for all]'}, {1, {'1970-01-01 00:00:00.000'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1151 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1152
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1153 % toffset
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1154 p = param({'toffset', 'The offset between the first x sample and t0.'}, paramValue.DOUBLE_VALUE(0));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1155 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1156
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1157 % T
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1158 p = param({'t',['Vector of time vertices for tsdata type. <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1159 'The value can also be an AO, in which case the X vector is used.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1160 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1161
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1162 % X
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1163 p = param({'x', 'Vector of X values for xydata type. <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1164 'The value can also be an AO, in which case the X vector is used.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1165 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1166
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1167 % F
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1168 p = param({'f', 'Vector of frequency values for fsdata type. <br>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1169 'The value can also be an AO, in which case the X vector is used.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1170 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1171
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1172 % Type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1173 p = param({'type','The data type. If this is empty, the constructor will attempt to determine the type from the other parameters.'}, {1,{'', 'tsdata', 'fsdata', 'xydata', 'cdata'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1174 p.setDefaultIndex(1); % Set the default to 'tsdata'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1175 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1176
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1177 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1178 p = param({'xunits','Unit on X axis.'}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1179 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1180
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1181 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1182 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1183 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1184
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1185 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1186 %--- Create from a waveform description
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1187 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1188 case 'from waveform'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1189 % Waveform
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1190 p = param({'waveform', 'A waveform description.<br>A special case is the ''<b>sine wave</b>'' because you can create more sinewaves which are summed. For this case you can add several values for ''A'', ''f'', ''phi'', ''nsecs'' and/or ''Toff'''}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1191 {1, {'sine wave', 'noise', 'chirp', 'gaussian pulse', 'square wave', 'sawtooth'}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1192 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1193
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1194 % A
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1195 p = param({'A','Amplitude of the signal. [for ''sine wave''].'}, {1, {1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1196 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1197
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1198 % F
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1199 p = param({'f', 'Frequency of the signal. [for ''sine wave'', ''square wave'', ''sawtooth''].'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1200 {1, {1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1201 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1202
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1203 % Phi
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1204 p = param({'phi','Phase of the signal. [for ''sine wave'']'}, {1, {0}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1205 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1206
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1207 % Toff
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1208 p = param({'Toff', ['Offset of the different sine waves, as [for ''sine wave'']<ul>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1209 '<li>a vector of seconds</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1210 '<li>a cell array with the offsets as a string</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1211 '<li>a vector time objects</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1212 '</ul>Remark: If t0 is not specified then it will be set to the first value of Toff.<br><br>Offset of the signal, in seconds. [for all other]']}, {1, {0}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1213 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1214
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1215 % gaps
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1216 p = param({'gaps', 'Instead of defining an offset it is possible to define a gap before the sine wave. [for ''sine wave'']<br/>'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1217 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1218
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1219 % Type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1220 p = param({'Type', 'Noise type. [for ''noise'']'}, {1, {'Normal', 'Uniform'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1221 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1222
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1223 % Sigma
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1224 p = param({'Sigma', 'The standard deviation of the noise. [for ''noise'']'}, {1, {1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1225 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1226
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1227 % F0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1228 p = param({'F0', 'A fundamental/start frequency of the signal. [for ''chirp'', ''gaussian pulse'']'}, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1229 {1, {1}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1230 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1231
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1232 % F1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1233 p = param({'F1', 'The end frequency of the signal. [for ''chirp'']'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1234 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1235
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1236 % T1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1237 p = param({'T1', 'The end time of the signal. [for ''chirp'']'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1238 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1239
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1240 % BW
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1241 p = param({'BW', 'The bandwidth of the signal. [for ''gaussian pulse'']'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1242 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1243
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1244 % Duty
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1245 p = param({'Duty', 'The duty-cycle of the signal (in %). [for ''square wave'']'}, {1, {50}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1246 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1247
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1248 % Width
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1249 p = param({'Width', 'The width of the signal. [0-1] [for ''sawtooth'']'}, {1, {0.5}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1250 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1251
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1252 % Fs, Nsecs, Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1253 out.append(plist.TSDATA_PLIST);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1254 out.remove('toffset');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1255
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1256 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1257 p = param({'yunits','Unit on Y axis. [for all]'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1258 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1259
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1260 % RAND_STREAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1261 p = param({'RAND_STREAM', 'Set the random stream for noise generation. This should be a structure with the fields of the properties for the class RandStream (help RandStream).'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1262 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1263
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1264 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1265 %--- Create from a set of pzm coefficients
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1266 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1267 case 'from pzmodel'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1268
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1269 % PZModel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1270 p = param({'pzmodel','A pole/zero model which builds the time-series AO.'}, {1, {pzmodel}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1271 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1272
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1273 % Fs, Nsecs, Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1274 out.append(plist.TSDATA_PLIST);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1275
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1276 % Yunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1277 p = param({'yunits','Unit on Y axis.'}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1278 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1279
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1280 % RAND_STREAM
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1281 p = param({'RAND_STREAM', 'Set the random stream for noise generation. This should be a structure with the fields of the properties for the class RandStream (help RandStream).'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1282 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1283
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1284 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1285 %--- Create from a smodel
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1286 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1287 case 'from smodel'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1288
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1289 % Model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1290 p = param({'model', 'The smodel to evaluate and convert to an AO. '}, {1, {smodel()}, paramValue.OPTIONAL});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1291 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1292
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1293 % X
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1294 p = param({'x','Values for X axis.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1295 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1296
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1297 % Xunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1298 p = param({'xunits','Unit on X axis.'}, paramValue.STRING_VALUE('s'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1299 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1300
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1301 % Type
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1302 p = param({'type','Choose the data type.'}, paramValue.DATA_TYPES);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1303 p.val.setValIndex(1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1304 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1305
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1306 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1307 %--- Create from a pest
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1308 %------------------------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1309 case 'from pest'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1310
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1311 % Model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1312 p = param({'pest', 'The pest object to extract the AO from. '}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1313 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1314
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1315 % Parameter
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1316 p = param({'parameter',['Name of the parameter(s) to be extracted.<br>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1317 'If empty, all parameters will be extracted into a vector ao AOs.']}, paramValue.STRING_VALUE(''));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1318 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1319
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1320 case 'from parameter'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1321
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1322 % parameter
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1323 p = param({'parameter', ['The parameter or plist to make an AO from. <br>' ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1324 'If the plist is a built-in one, it is also possible just to input its name.']}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1325 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1326
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1327 % key
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1328 p = param({'key', 'The parameter name to extract from the plist. '}, paramValue.EMPTY_STRING);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1329 out.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1330
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1331 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1332 end % End getDefaultPlist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1333
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1334 function obj = initObjectWithSize(n,m)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1335 if numel(n) > 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1336 obj = ao.newarray([n(1) n(2)]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1337 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1338 obj = ao.newarray([n m]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1339 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1340 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1341
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1342 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1343
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1344
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1345 methods (Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1346 varargout = setData(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1347 varargout = attachToDom(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1348 varargout = welch(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1349 varargout = ifft_core(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1350 varargout = fft_core(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1351 varargout = fftfilt_core(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1352 varargout = xspec(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1353 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1354
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1355 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1356 % Methods (static, private) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1357 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1358 methods (Static = true, Access = private)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1359 % constructor functions
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1360 % Spectral estimate function
|
43
|
1361 varargout = wosa(varargin);
|
0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1362 [yy, dyy, info] = welchscale(xx, dxx, win, fs, norm, inunits)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1363 [x,M,isreal_x,y,Ly,win,winName,winParam,noverlap,k,L,options] = welchparse(x,esttype,varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1364 [P,f] = computeperiodogram(x,win,nfft,esttype,varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1365 [Xx,f] = computeDFT(xin,nfft,varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1366
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1367 % Noise generator functions
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1368 varargout = ngconv(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1369 varargout = ngsetup(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1370 varargout = ngsetup_vpa(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1371 varargout = nginit(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1372 varargout = ngprop(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1373 varargout = fq2fac(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1374 varargout = conv_noisegen(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1375 varargout = mchol(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1376
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1377 % LPSD-type methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1378 varargout = ltf_plan(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1379 varargout = mlpsd_mex(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1380 varargout = mlpsd_m(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1381 varargout = mltfe(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1382 varargout = findFsMax(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1383 varargout = findFsMin(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1384 varargout = findShortestVector(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1385 varargout = lxspec(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1386
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1387 varargout = ltpda_fitChiSquare(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1388
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1389 varargout = elementOp(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1390 varargout = melementOp(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1391
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1392 varargout = applymethod(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1393
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1394 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1395
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1396 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1397 % Methods (static, protected) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1398 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1399
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1400 methods (Static = true, Access = protected)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1401 function pl = addGlobalKeys(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1402
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1403 % Call super-class
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1404 addGlobalKeys@ltpda_uoh(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1405
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1406 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1407
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1408 function pl = removeGlobalKeys(pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1409
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1410 % Call super-class
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1411 removeGlobalKeys@ltpda_uoh(pl);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1412
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1413 % Remove 'plotinfo'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1414 pl.remove('plotinfo');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1415 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1416 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1417
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1418 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1419 % Methods (static, hidden) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1420 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1421
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1422 methods (Static = true, Hidden = true)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1423 varargout = loadobj(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1424 varargout = update_struct(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1425 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1426
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1427 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1428 % Methods (public) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1429 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1430 methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1431
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1432 % Setters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1433 varargout = setXunits(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1434 varargout = setYunits(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1435 varargout = setT0(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1436 varargout = setFs(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1437 varargout = setXY(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1438 varargout = setY(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1439 varargout = setX(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1440 varargout = setZ(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1441 varargout = setDy(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1442 varargout = setDx(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1443
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1444 % Other methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1445 varargout = copy(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1446 h = md5(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1447 val = fromProcinfo(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1448
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1449 end % End public methods
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1450
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1451
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1452 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1453 % Methods (protected) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1454 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1455 methods (Access = protected)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1456 obj = fromDataInMAT(obj, data, filename)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1457 obj = fromDatafile(obj, pli)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1458 obj = fromComplexDatafile(obj, pli)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1459 obj = fromStruct(obj, a_struct)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1460 varargout = fromDom(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1461 varargout = csvGenerateData(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1462 varargout = checkDataType(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1463 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1464
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1465
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1466 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1467 % Methods (private) %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1468 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1469 methods (Access = private)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1470 % Constructors
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1471 varargout = fromParameter(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1472 varargout = fromVals(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1473 varargout = fromXYVals(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1474 varargout = fromTSfcn(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1475 varargout = fromWaveform(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1476 varargout = fromFcn(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1477 varargout = fromFSfcn(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1478 varargout = fromSpecWin(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1479 varargout = fromPolyval(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1480 varargout = fromSModel(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1481 varargout = fromPzmodel(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1482 varargout = fromXYFcn(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1483 varargout = fromCSD(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1484 varargout = fromPest(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1485
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1486 varargout = fixAxisData(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1487 varargout = smallvec_coef(in,pl)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1488
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1489 varargout = setUnitsForAxis(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1490 varargout = clearErrors(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1491
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1492 % Others
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1493 varargout = applyoperator(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1494 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1495
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1496 end
|