0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 % RESP returns the complex response of a transfer function as an Analysis Object.
|
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: RESP returns the complex response of a transfer function as
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 % an Analysis Object.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 % CALL: a = resp(obj, f); % compute response for vector f
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % a = resp(obj, f1, f2, nf); % compute response from f1 to f2 in nf
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % steps.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % a = resp(obj, pl); % compute response from parameter list.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % a = resp(obj); % compute response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 % <a href="matlab:utils.helper.displayMethodInfo('ltpda_tf', 'resp')">Parameters Description</a>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 % VERSION: $Id: resp.m,v 1.14 2011/04/18 16:50:51 ingo Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 function varargout = resp(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 %%% Check if this is a call for parameters
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 if utils.helper.isinfocall(varargin{:})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 varargout{1} = getInfo(varargin{3});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 return
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 %%% Input objects checks
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 if nargin < 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 error('### incorrect number of inputs.')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 objs = {};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 rest = {};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 plin = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 invars = {};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36 % Check input shape
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 % only one input -> keep shape
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 % more than one input -> convert to list.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 classMatch = zeros(nargin, 1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 for ii = 1:nargin
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 if isa(varargin{ii}, 'ltpda_tf')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 classMatch(ii) = 1;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 for ii = 1:nargin
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 if classMatch(ii) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 if sum(classMatch) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 objs = num2cell(varargin{ii});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 invars = [invars repmat({inputname(ii)}, 1, numel(varargin{ii}))];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 objs = [objs reshape(num2cell(varargin{ii}), 1, [])];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 invars = [invars repmat({inputname(ii)}, 1, numel(varargin{ii}))];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 if isa(varargin{ii}, 'plist')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 plin = [plin varargin{ii}];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 rest = [rest {varargin{ii}}];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 % Combine the input plists
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 plin = combine(plin, plist());
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 % Initialize output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 bank = plin.combine(getDefaultPlist('Range')).find('bank');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 switch lower(bank)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 case 'none'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 bs = ao.initObjectWithSize(size(objs,1), size(objs,2));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 bs = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 % Loop over transfer functions
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 for pp=1:numel(objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 % process this transfer function
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 obj = objs{pp};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % Now look at the model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 name = obj.name;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 if (plin.isparam('f')) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85 (numel(rest) == 1 && isnumeric(rest{1}) && isvector(rest{1})) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 (numel(rest) == 1 && isa(rest{1}, 'ao') && isa(rest{1}.data, 'fsdata')) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 (numel(rest) == 1 && isa(rest{1}, 'ao') && isa(rest{1}.data, 'xydata'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 %%%%%%%%%% Response with a f vector %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 %%% r = obj.resp(plist-object('f'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92 %%% r = obj.resp(ao-object(fsdata))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 %%% r = obj.resp(ao-object(xydata))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95 if numel(rest) == 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 pl = combine(plist('f', rest{1}), getDefaultPlist('List'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 pl = combine(plin, getDefaultPlist('List'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101 %%% Get f-vector
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 f = pl.find('f');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 %%% Get the f-vector from the AO
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 if isa(f, 'ao')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 f = f.data.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107 elseif isnumeric(f) && isvector(f)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 %%% nothing to do
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 error('### The f-vector must be a vector or an AO, but it is from the class [%s]', class(f));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113 elseif (plin.isparam('f1')) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 (plin.isparam('f2')) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 (numel(rest) == 0) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 (numel(rest) == 2 && isnumeric(rest{1}) && isnumeric(rest{2})) || ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 (numel(rest) == 3 && isnumeric(rest{1}) && isnumeric(rest{2}) && isnumeric(rest{3}))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 %%%%%%%%%% Response with f1, f2 and nf %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 %%% r = obj.resp(plist-object('f1', 'f2'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 %%% r = obj.resp(plist-object('f1'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123 %%% r = obj.resp(plist-object('f2'))
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 %%% r = obj.resp()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 %%% r = obj.resp(f1, f2)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 %%% r = obj.resp(f1, f2, nf)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 if numel(rest) == 0 && plin.nparams == 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 pl = getDefaultPlist('Range');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 elseif numel(rest) == 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 pl = combine(plist('f1', rest{1}, 'f2', rest{2}), getDefaultPlist('Range'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 elseif numel(rest) == 3
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 pl = combine(plist('f1', rest{1}, 'f2', rest{2}, 'nf', rest{3}), getDefaultPlist('Range'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 pl = combine(plin, getDefaultPlist('Range'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 f1 = pl.find('f1');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 f2 = pl.find('f2');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143 nf = pl.find('nf');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 scale = pl.find('scale');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 % Get the default values if 'f1' or 'f2' are not existing
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 if isa(obj, 'miir') || isa(obj, 'mfir')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 % Special case for iir- and fir filters.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149 if isempty(f1), f1 = obj.fs/1000; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 if isempty(f2), f2 = obj.fs/2-1/nf; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 if isempty(f1), f1 = 0; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 if isempty(f2), f2 = 0.5; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 if isempty(f1), f1 = getlowerFreq(obj)/10; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 if isempty(f2), f2 = getupperFreq(obj)*10; end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 switch lower(scale)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 case 'lin'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 f = linspace(f1, f2, nf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 case 'log'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 f = logspace(log10(f1), log10(f2), nf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 error('### Unknown or incorrect number of inputs.');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 %%%%%%%%%% deal with rows %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 reshape_f = false;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 if size(f,1) > 1
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175 f = f.';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 reshape_f = true;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 %%%%%%%%%% compute the response %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 r = respCore(obj, f);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186 %%%%%%%%%% Build output AO %%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 if reshape_f
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 f = f.';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 r = r.';
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 % create new output fsdata
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 fsd = fsdata(f, r);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 % set yunits = ounits./iunits
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197 fsd.setXunits('Hz');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 fsd.setYunits(obj.ounits./obj.iunits);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 % set fs, if the object is a discrete filter
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 if isa(obj, 'ltpda_filter')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 fsd.setFs(obj.fs);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 % make output analysis object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 b = ao(fsd);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 switch lower(bank)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209 case 'none'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 % Add history
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 b.addHistory(getInfo('None'), pl, invars, obj.hist);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 % set name
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 if isempty(name)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 b.setName(sprintf('resp(%s)', invars{pp}));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 b.setName(sprintf('resp(%s)', name));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 % Add to outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 bs(pp) = b;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221 case 'serial'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 if isempty(bs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 bs = b;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 oname = obj.name;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 bs = bs .* b;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 oname = [oname '.*' obj.name];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 case 'parallel'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 if isempty(bs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232 bs = b;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 oname = obj.name;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 bs = bs + b;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 oname = [oname '+' obj.name];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 error('Unknown option for parameter ''bank'': %s', bank);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 if strcmpi(bank, 'parallel') || strcmpi(bank, 'serial')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 inhists = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 for ii = 1:numel(objs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 inhists = [inhists objs{ii}.hist];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 % Add history
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 bs.addHistory(getInfo('None'), pl, [], inhists);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 % set name
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 bs.setName(sprintf('resp(%s)', oname));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 % Outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 if nargout == 0
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
257 iplot(bs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
258 elseif nargout == numel(bs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
259 % List of outputs
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 for ii = 1:numel(bs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 varargout{ii} = bs(ii);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 % Single output
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 varargout{1} = bs;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 % Local Functions %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 % FUNCTION: getInfo
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 % DESCRIPTION: Get Info Object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 % HISTORY: 11-07-07 M Hewitson
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 % Creation.
|
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
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 function ii = getInfo(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 if nargin == 1 && strcmpi(varargin{1}, 'None')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 sets = {};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 pls = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 elseif nargin == 1&& ~isempty(varargin{1}) && ischar(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 sets{1} = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 pls = getDefaultPlist(sets{1});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 sets = {'List', 'Range'};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 pls = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 for kk=1:numel(sets)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 pls = [pls getDefaultPlist(sets{kk})];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 % Build info object
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 ii = minfo(mfilename, 'ltpda_tf', 'ltpda', utils.const.categories.sigproc, '$Id: resp.m,v 1.14 2011/04/18 16:50:51 ingo Exp $', sets, pls);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302 ii.setModifier(false);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303 ii.setArgsmin(1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 % FUNCTION: getDefaultPlist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 % DESCRIPTION: Get Default Plist
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 % HISTORY: 11-07-07 M Hewitson
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 % Creation.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 function plout = getDefaultPlist(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 persistent pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 persistent lastset;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 if exist('pl', 'var')==0 || isempty(pl) || ~strcmp(lastset, set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 pl = buildplist(set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 lastset = set;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 plout = pl;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 function plo = buildplist(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 switch lower(set)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 case 'list'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 plo = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 p = param({'f',['A vector of frequencies to evaluate at or an AO \n',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 'whereby the x-axis is taken for the frequency values.']}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 plo.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 case 'range'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 plo = plist();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 p = param({'f1','Start frequency.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 plo.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 p = param({'f2','Stop frequency.'}, paramValue.EMPTY_DOUBLE);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 plo.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 p = param({'nf','Number of evaluation frequencies.'}, paramValue.DOUBLE_VALUE(1000));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347 plo.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 p = param({'scale',['Spacing of frequencies:<ul>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 '<li>''lin'' - Linear scale.</li>', ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 '<li>''log'' - Logarithmic scale.</li></ul>']}, {2, {'lin', 'log'} paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 plo.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 otherwise
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 error('### Unknown set [%s]', set);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 p = param({'bank',['How to handle a vector of input filters<br/>(only iir and fir filters):<ul>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 '<li>''None'' - process each filter individually.</li>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 '<li>''Serial'' - return the response of a serial filter bank.</li>',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 '<li>''Parallel'' - return the response of a parallel filter bank.</li></ul>']}, {1, {'none', 'serial', 'parallel'}, paramValue.SINGLE});
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 plo.append(p);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365
|