0
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
1 function pzmodel_helper(varargin)
|
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: PZMODEL_HELPER opens the LTPDA pzmodel GUI.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
5 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
6 % CALL: pzmodel_helper()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
7 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
8 % VERSION: $Id: pzmodel_helper.m,v 1.12 2009/09/07 17:23:07 nicola Exp $
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
9 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
10 % HISTORY: 07-09-2009 N Tateo
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
11 % Creation
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
12 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
14
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
15
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
16
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
17 % This function draws the PZmodel helper main figure.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
18
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
19 % Some initial setup
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
20 import utils.const.*
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
21 prefs = getappdata(0, 'LTPDApreferences');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
22 utils.helper.msg(msg.PROC1, 'building Main Figure');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
23
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
24 Screen = get(0,'screensize');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
25 mainfig.Gproperties.Screen = Screen;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
26 mainfig.Gproperties.Gwidth = 0.6;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
27 mainfig.Gproperties.Gheight = 0.9;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
28 mainfig.Gproperties.Gborder = 10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
29 fontSize = (prefs.repository.fontsize+2)*(1440/Screen(3));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
30
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
31 l = (0.5-mainfig.Gproperties.Gwidth/2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
32 b = (0.5-mainfig.Gproperties.Gheight/2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
33 w = mainfig.Gproperties.Gwidth;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
34 h = mainfig.Gproperties.Gheight;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
35 mainfig.Gproperties.Gposition = [l b w h];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
36
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
37 if ~isempty(varargin) && ishandle(varargin{1})
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
38 mainfig.handle = varargin{1};
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
39 set(mainfig.handle, 'Tag', 'PZMODELhelpermainfig');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
40 set(mainfig.handle, 'Units', 'normalized');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
41 set(mainfig.handle, 'Visible', 'on');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
42 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
43 % Initialize and hide the GUI as it is being constructed.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
44 mainfig.handle = figure('Name', 'PZModel Helper GUI',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
45 'NumberTitle', 'off',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
46 'Visible','on',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
47 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
48 'Position',mainfig.Gproperties.Gposition,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
49 'Toolbar', 'none',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
50 'MenuBar', 'none',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
51 'Color', 'w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
52 'Resize', 'on',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
53 'Tag', 'PZMODELhelpermainfig');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
54 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
55
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
56 % % DEFINE THE HANDLES VARIABLE
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
57 % handles = struct();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
58 % handles.pzEdit = findobj(gcf,'Tag','pzEdit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
59 % handles.phaseAxes = findobj(gcf,'Tag','phaseAxes');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
60 % handles.filterStrEdit = findobj(gcf,'Tag','filterStrEdit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
61 % handles.fsEdit = findobj(gcf,'Tag','fsEdit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
62 % handles.nfEdit = findobj(gcf,'Tag','nfEdit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
63 % handles.f2Edit = findobj(gcf,'Tag','f2Edit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
64 % handles.f1Edit = findobj(gcf,'Tag','f1Edit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
65 % handles.gainEdit = findobj(gcf,'Tag','gainEdit');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
66 % handles.magAxes = findobj(gcf,'Tag','magAxes');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
67 % handles.poleList = findobj(gcf,'Tag','poleList');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
68 % handles.zeroList = findobj(gcf,'Tag','zeroList');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
69 % handles.main = gcf;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
70 % % handles. = findobj(gcf,'Tag','');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
71 % % handles. = findobj(gcf,'Tag','');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
72 %
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
73 % % 'uipanel1'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
74 % % 'uipanel2'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
75 % % 'saveAObtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
76 % % 'figureBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
77 % % 'replotBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
78 % % 'GainTxt'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
79 % % 'addZeroBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
80 % % 'addPoleBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
81 % % 'deleteZerosBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
82 % % 'deletePolesBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
83 % % 'clearBtn'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
84 % % 'output'
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
85
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
86 % create empty lists
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
87 poles = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
88 zeros = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
89 setappdata(gcf, 'poles', poles);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
90 setappdata(gcf, 'zeros', zeros);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
91 setappdata(gcf, 'filt', []);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
92
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
93 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
94 %%%%%%%%%%%%%%%%%%%%%%%%%% DRAW CONTENTS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
95
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
96 uip1 = uipanel('Title', 'Response',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
97 'FontSize', fontSize-1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
98 'BackgroundColor','white',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
99 'Tag', 'uipanel1',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
100 'Position',[.35 .15 .64 .84]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
101
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
102 uip2 = uipanel('Title', 'Pole/zero entry',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
103 'FontSize', fontSize-1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
104 'BackgroundColor','white',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
105 'Tag', 'uipanel2',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
106 'Position',[.01 .6 .32 .39]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
107
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
108 uip3 = uipanel('Title', 'Plot controls',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
109 'FontSize', fontSize-1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
110 'BackgroundColor','white',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
111 'Tag', 'uipanel3',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
112 'Position',[.01 .15 .32 .44]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
113
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
114 uicontrol('Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
115 'String', 'MIIR constructor string:',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
116 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
117 'FontSize', fontSize+2,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
118 'FontWeight','bold',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
119 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
120 'backgroundColor','white',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
121 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
122 'Position', [.02 .115 .3 .03])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
123
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
124 uicontrol('Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
125 'Tag', 'filterStrEdit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
126 'Max',10,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
127 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
128 'FontSize', fontSize+2,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
129 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
130 'backgroundColor',[.94 .94 .94],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
131 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
132 'Position', [.02 .01 .96 .1])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
133
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
134 %%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
135 % First panel contents
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
136 %%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
137
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
138 axes('Parent',uip1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
139 'Tag','phaseAxes',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
140 'Box','on',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
141 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
142 'Position', [.11 .08 .8 .35]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
143
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
144 axes('Parent',uip1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
145 'Tag','magAxes',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
146 'Box','on',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
147 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
148 'Position', [.11 .52 .8 .43]);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
149
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
150 %%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
151 % Second panel contents
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
152 %%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
153
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
154 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
155 'Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
156 'Tag', 'pzEdit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
157 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
158 'String', '1 0',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
159 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
160 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
161 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
162 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
163 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
164 'Position', [.1 .85 .35 .1])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
165
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
166 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
167 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
168 'String', 'Frequency [Hz] (Q)',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
169 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
170 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
171 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
172 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
173 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
174 'Position', [.45 .83 .5 .1])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
175
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
176 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
177 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
178 'String', 'Add pole',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
179 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
180 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
181 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
182 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
183 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
184 'Callback', @addPoleBtn_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
185 'Position', [.075 .75 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
186
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
187 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
188 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
189 'String', 'Add zero',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
190 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
191 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
192 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
193 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
194 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
195 'Callback', @addZeroBtn_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
196 'Position', [.525 .75 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
197
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
198 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
199 'Style','listbox',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
200 'Tag','poleList',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
201 'String', '-',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
202 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
203 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
204 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
205 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
206 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
207 ... 'Callback', @poleList_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
208 'Position', [.075 .25 .4 .45])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
209
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
210 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
211 'Style','listbox',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
212 'Tag','zeroList',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
213 'String', '-',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
214 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
215 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
216 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
217 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
218 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
219 ... 'Callback', @zeroList_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
220 'Position', [.525 .25 .4 .45])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
221
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
222 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
223 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
224 'String', 'Delete',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
225 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
226 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
227 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
228 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
229 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
230 'Callback', @deletePolesBtn_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
231 'Position', [.075 .15 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
232
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
233 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
234 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
235 'String', 'Delete',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
236 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
237 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
238 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
239 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
240 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
241 'Callback', @deleteZerosBtn_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
242 'Position', [.525 .15 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
243
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
244 uicontrol('Parent',uip2, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
245 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
246 'String', 'Clear lists',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
247 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
248 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
249 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
250 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
251 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
252 'Callback', @clearBtn_Callback,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
253 'Position', [.075 .04 .85 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
254
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
255 %%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
256 % Third panel contents
|
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 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
260 'Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
261 'Tag', 'gainEdit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
262 'Callback',@valueEdit_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
263 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
264 'String', '1',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
265 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
266 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
267 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
268 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
269 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
270 'Position', [.1 .87 .3 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
271 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
272 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
273 'String', 'Gain',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
274 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
275 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
276 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
277 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
278 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
279 'Position', [.47 .855 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
280
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
281 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
282 'Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
283 'Tag', 'fsEdit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
284 'Callback',@valueEdit_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
285 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
286 'String', '',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
287 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
288 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
289 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
290 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
291 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
292 'Position', [.1 .75 .3 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
293 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
294 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
295 'String', 'Sample rate',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
296 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
297 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
298 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
299 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
300 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
301 'Position', [.47 .735 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
302
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
303
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
304 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
305 'Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
306 'Tag', 'f1Edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
307 'Callback',@valueEdit_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
308 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
309 'String', '',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
310 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
311 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
312 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
313 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
314 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
315 'Position', [.1 .63 .3 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
316 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
317 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
318 'String', 'f1',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
319 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
320 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
321 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
322 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
323 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
324 'Position', [.47 .615 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
325
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
326 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
327 'Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
328 'Tag', 'f2Edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
329 'Callback',@valueEdit_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
330 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
331 'String', '',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
332 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
333 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
334 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
335 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
336 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
337 'Position', [.1 .51 .3 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
338 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
339 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
340 'String', 'f2',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
341 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
342 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
343 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
344 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
345 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
346 'Position', [.47 .495 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
347
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
348 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
349 'Style','edit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
350 'Tag', 'nfEdit',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
351 'Callback',@valueEdit_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
352 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
353 'String', '',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
354 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
355 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
356 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
357 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
358 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
359 'Position', [.1 .39 .3 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
360 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
361 'Style','text',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
362 'String', 'Nf',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
363 'HorizontalAlignment', 'left',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
364 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
365 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
366 'backgroundColor','w',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
367 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
368 'Position', [.47 .375 .4 .08])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
369
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
370 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
371 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
372 'Tag', 'replotBtn',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
373 'Callback', @replotBtn_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
374 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
375 'String', 'Replot',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
376 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
377 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
378 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
379 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
380 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
381 'Position', [.1 .27 .8 .07])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
382
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
383 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
384 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
385 'Tag', 'figureBtn',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
386 'Callback', @figureBtn_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
387 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
388 'String', 'Figure',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
389 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
390 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
391 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
392 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
393 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
394 'Position', [.1 .16 .8 .07])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
395
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
396 uicontrol('Parent',uip3, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
397 'Style','pushbutton',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
398 'Tag', 'saveAObtn',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
399 'Callback', @saveAObtn_Callback, ...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
400 'Max',1,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
401 'String', 'Save as',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
402 'HorizontalAlignment', 'center',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
403 'FontSize', fontSize,...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
404 'ForeGroundColor','black',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
405 'backgroundColor',[.92 .92 .92],...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
406 'Units','normalized',...
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
407 'Position', [.1 .05 .8 .07])
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
408
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
409
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
410
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
411 %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
412 %%%%%%%%%%%%%%%%%%%%%%%%%%% SUBFUNCTIONS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
413 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
414
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
415 % --- Executes on button press in addPoleBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
416 function addPoleBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
417 % hObject handle to addPoleBtn (see GCBO)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
418 % eventdata reserved - to be defined in a future version of MATLAB
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
419
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
420 % get values from pzEdit
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
421 strVal = get(findobj(gcf,'Tag','pzEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
422 val = str2num(strVal);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
423 f = val(1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
424 if length(val) == 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
425 q = val(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
426 p = pz(f,q);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
427 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
428 p = pz(f);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
429 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
430
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
431 poles = getappdata(gcf, 'poles');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
432 poles = [poles p];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
433 setappdata(gcf, 'poles', poles);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
434
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
435 % update list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
436 updatePolesList();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
437
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
438 % update model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
439 updateModelResp();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
440
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
441 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
442
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
443 % --- Executes on button press in addZeroBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
444 function addZeroBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
445 % hObject handle to addZeroBtn (see GCBO)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
446 % eventdata reserved - to be defined in a future version of MATLAB
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
447
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
448 % get values from pzEdit
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
449 strVal = get(findobj(gcf,'tag','pzEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
450 val = str2num(strVal);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
451 f = val(1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
452 if length(val) == 2
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
453 q = val(2);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
454 z = pz(f,q);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
455 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
456 z = pz(f);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
457 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
458
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
459 zeros = getappdata(gcf, 'zeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
460 zeros = [zeros z];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
461 setappdata(gcf, 'zeros', zeros);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
462
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
463 % update list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
464 updateZerosList();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
465
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
466 % update model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
467 updateModelResp();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
468
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
469 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
470
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
471 %----------- Update Poles List -----------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
472 function updatePolesList(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
473
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
474 poles = getappdata(gcf, 'poles');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
475 pstr = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
476 for n=1:length(poles)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
477 p = poles(n);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
478 f = p.f;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
479 q = p.q;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
480 if q>0.5
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
481 pstr = strvcat(pstr, sprintf('%2.2f Hz Q=%2.2f', f, q));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
482 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
483 pstr = strvcat(pstr, sprintf('%2.2f Hz', f));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
484 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
485 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
486
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
487 if isempty(poles)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
488 set(findobj(gcf,'tag','poleList'), 'String', ' ');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
489 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
490 set(findobj(gcf,'tag','poleList'), 'String', pstr);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
491 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
492 set(findobj(gcf,'tag','poleList'), 'Value', 1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
493
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
494 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
495
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
496 %----------- Update Zeros List -----------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
497 function updateZerosList(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
498
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
499 zeros = getappdata(gcf, 'zeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
500 pstr = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
501 for n=1:length(zeros)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
502 p = zeros(n);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
503 f = p.f;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
504 q = p.q;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
505 if q>0.5
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
506 pstr = strvcat(pstr, sprintf('%2.2f Hz Q=%2.2f', f, q));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
507 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
508 pstr = strvcat(pstr, sprintf('%2.2f Hz', f));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
509 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
510 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
511
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
512 if isempty(zeros)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
513 set(findobj(gcf,'tag','zeroList'), 'String', ' ');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
514 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
515 set(findobj(gcf,'tag','zeroList'), 'String', pstr);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
516 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
517 set(findobj(gcf,'tag','zeroList'), 'Value', 1);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
518 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
519
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
520 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
521 %----------- Update Model response -----------------------------
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
522 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
523 function updateModelResp(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
524
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
525 gain = str2double(get(findobj(gcf,'tag','gainEdit'), 'String'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
526 poles = getappdata(gcf, 'poles');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
527 zeros = getappdata(gcf, 'zeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
528
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
529 pzm = pzmodel(gain, poles, zeros);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
530
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
531 f1s = get(findobj(gcf,'tag','f1Edit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
532 f2s = get(findobj(gcf,'tag','f2Edit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
533 nfs = get(findobj(gcf,'tag','nfEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
534 fss = get(findobj(gcf,'tag','fsEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
535
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
536 if isempty(f1s)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
537 f1 = getlowerFreq(pzm)/10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
538 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
539 f1 = str2double(f1s);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
540 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
541 if isempty(f2s)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
542 f2 = getupperFreq(pzm)*10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
543 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
544 f2 = str2double(f2s);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
545 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
546 if isempty(nfs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
547 nf = 1000;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
548 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
549 nf = str2double(nfs);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
550 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
551
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
552 if ~isempty(pzm.poles) || ~isempty(pzm.zeros)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
553
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
554 % make model response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
555 a = resp(pzm, f1, f2, nf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
556 d = a.data;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
557 mx = d.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
558 my = d.y;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
559
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
560 % make IIR response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
561 if isempty(fss)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
562 filt = miir(plist([param('pzmodel', pzm)]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
563 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
564 filt = miir(plist([param('pzmodel', pzm) param('fs', str2double(fss))]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
565 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
566 setappdata(gcf, 'filt', filt);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
567 set(findobj(gcf,'tag','filterStrEdit'), 'String', ['miir(' string(pzm) ')']);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
568
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
569 filtresp = resp(filt, plist(param('f', mx.')));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
570 d = filtresp.data;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
571 fx = d.x;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
572 fy = d.y;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
573
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
574 axes(findobj(gcf,'tag','magAxes')); % Select the proper axes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
575 loglog(mx,abs(my), fx, abs(fy), 'r--')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
576 grid on;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
577 axis tight
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
578 xlabel('');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
579 ylabel('Magnitude');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
580 legend('Pole/Zero model', 'IIR','Location','SouthWest')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
581 set(gca,'tag','magAxes')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
582
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
583 axes(findobj(gcf,'tag','phaseAxes')); % Select the proper axes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
584 semilogx(mx, utils.math.phase(my), fx, utils.math.phase(fy), 'r--')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
585 grid on;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
586 axis tight
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
587 xlabel('Frequency [Hz]');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
588 ylabel('Phase [deg]');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
589 set(gca,'tag','phaseAxes')
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
590 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
591 axes(findobj(gcf,'tag','magAxes')); % Select the proper axes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
592 cla
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
593 axes(findobj(gcf,'tag','phaseAxes')); % Select the proper axes
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
594 cla
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
595 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
596
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
597 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
598
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
599 function valueEdit_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
600 updateModelResp()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
601 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
602
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
603 % --- Executes on button press in replotBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
604 function replotBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
605 updateModelResp()
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
606 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
607
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
608 % --- Executes on button press in figureBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
609 function figureBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
610
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
611 gain = str2double(get(findobj(gcf,'tag','gainEdit'), 'String'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
612 poles = getappdata(gcf, 'poles');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
613 zeros = getappdata(gcf, 'zeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
614
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
615 pzm = pzmodel(gain, poles, zeros);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
616
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
617 f1s = get(findobj(gcf,'tag','f1Edit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
618 f2s = get(findobj(gcf,'tag','f2Edit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
619 nfs = get(findobj(gcf,'tag','nfEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
620 fss = get(findobj(gcf,'tag','fsEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
621
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
622 if isempty(f1s)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
623 f1 = getlowerFreq(pzm)/10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
624 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
625 f1 = str2double(f1s);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
626 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
627 if isempty(f2s)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
628 f2 = getupperFreq(pzm)*10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
629 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
630 f2 = str2double(f2s);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
631 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
632 if isempty(nfs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
633 nf = 1000;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
634 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
635 nf = str2double(nfs);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
636 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
637
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
638 % make model response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
639 a = resp(pzm, f1, f2, nf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
640 a.setName('PZmodel');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
641
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
642 % make IIR response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
643 if isempty(fss)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
644 filt = miir(plist([param('pzmodel', pzm)]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
645 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
646 filt = miir(plist([param('pzmodel', pzm) param('fs', str2double(fss))]));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
647 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
648
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
649
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
650 filtresp = resp(filt, plist(param('f', a.data.getX)));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
651 filtresp.setName('IIR filter');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
652
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
653 iplot(a, filtresp)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
654 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
655
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
656 % --- Executes on button press in clearBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
657 function clearBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
658
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
659 setappdata(gcf, 'poles', []);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
660 setappdata(gcf, 'zeros', []);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
661
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
662 % update list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
663 updateZerosList();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
664 updatePolesList();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
665
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
666 % update model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
667 updateModelResp();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
668 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
669
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
670
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
671 % --- Executes on button press in deletePolesBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
672 function deletePolesBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
673
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
674 % get selection from list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
675 values = get(findobj(gcf,'tag','poleList'), 'Value');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
676 % get poles
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
677 poles = getappdata(gcf, 'poles');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
678 po = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
679 for j=1:length(poles)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
680 if j~=values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
681 po = [po poles(j)]; %#ok<AGROW>
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
682 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
683 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
684 setappdata(gcf, 'poles', po);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
685 updatePolesList();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
686 % update model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
687 updateModelResp();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
688
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
689 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
690
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
691 % --- Executes on button press in deleteZerosBtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
692 function deleteZerosBtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
693
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
694 % get selection from list
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
695 values = get(findobj(gcf,'tag','zeroList'), 'Value');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
696 % get zeros
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
697 zeros = getappdata(gcf, 'zeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
698 zo = [];
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
699 for j=1:length(zeros)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
700 if j~=values
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
701 zo = [zo zeros(j)]; %#ok<AGROW>
|
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 setappdata(gcf, 'zeros', zo);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
705 updateZerosList();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
706 % update model
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
707 updateModelResp();
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
708 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
709
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
710 % --- Executes on button press in saveAObtn.
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
711 function saveAObtn_Callback(varargin)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
712
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
713 % get response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
714 gain = str2double(get(findobj(gcf,'tag','gainEdit'), 'String'));
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
715 poles = getappdata(gcf, 'poles');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
716 zeros = getappdata(gcf, 'zeros');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
717 pzm = pzmodel(gain, poles, zeros);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
718
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
719 f1s = get(findobj(gcf,'tag','f1Edit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
720 f2s = get(findobj(gcf,'tag','f2Edit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
721 nfs = get(findobj(gcf,'tag','nfEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
722 fss = get(findobj(gcf,'tag','fsEdit'), 'String');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
723
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
724 if isempty(f1s)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
725 f1 = getlowerFreq(pzm)/10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
726 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
727 f1 = str2double(f1s);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
728 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
729 if isempty(f2s)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
730 f2 = getupperFreq(pzm)*10;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
731 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
732 f2 = str2double(f2s);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
733 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
734 if isempty(nfs)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
735 nf = 1000;
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
736 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
737 nf = str2double(nfs);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
738 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
739
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
740 % make model response
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
741 a = resp(pzm, f1, f2, nf);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
742
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
743 % Get filename
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
744 [filename, pathname] = uiputfile('*.xml', 'LTPDA XML file (*.xml)', 'Save as');
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
745 if isequal(filename,0) || isequal(pathname,0)
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
746 else
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
747 fname = fullfile(pathname, filename);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
748 save(a, fname);
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
749 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
750 end
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
751
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
752
|
Daniele Nicolodi <nicolodi@science.unitn.it>
parents:
diff
changeset
|
753 end |