0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function ltpdv_zeroAdd(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
3 % Handles
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
4 myh = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 htab = varargin{end-1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 mainfig = varargin{end};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 % Get freq
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 fh = findobj(htab, 'Tag', 'LTPDVfilterPZfreq');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 fstr = get(fh, 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 if ~isempty(fstr)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 f = str2num(fstr);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15 % Get Q
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16 qh = findobj(htab, 'Tag', 'LTPDVfilterPZq');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 q = str2num(get(qh, 'String'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 % Add to zero list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 zeros = getappdata(mainfig, 'FilterZeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 if isempty(q)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 zeros = [zeros pz(f)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 zeros = [zeros pz(f,q)];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 setappdata(mainfig, 'FilterZeros', zeros);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 % Set pole list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 ltpdv_set_zero_list(mainfig);
|
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
|