1 | function varargout = plot_synchrotron_tune_scan(varargin) |
---|
2 | % PLOT_SYNCHROTRON_TUNE_SCAN M-file for plot_synchrotron_tune_scan.fig |
---|
3 | % PLOT_SYNCHROTRON_TUNE_SCAN, by itself, creates a new PLOT_SYNCHROTRON_TUNE_SCAN or raises the existing |
---|
4 | % singleton*. |
---|
5 | % |
---|
6 | % H = PLOT_SYNCHROTRON_TUNE_SCAN returns the handle to a new PLOT_SYNCHROTRON_TUNE_SCAN or the handle to |
---|
7 | % the existing singleton*. |
---|
8 | % |
---|
9 | % PLOT_SYNCHROTRON_TUNE_SCAN('CALLBACK',hObject,eventData,handles,...) calls the local |
---|
10 | % function named CALLBACK in PLOT_SYNCHROTRON_TUNE_SCAN.M with the given input arguments. |
---|
11 | % |
---|
12 | % PLOT_SYNCHROTRON_TUNE_SCAN('Property','Value',...) creates a new PLOT_SYNCHROTRON_TUNE_SCAN or raises the |
---|
13 | % existing singleton*. Starting from the left, property value pairs are |
---|
14 | % applied to the GUI before plot_synchrotron_tune_scan_OpeningFunction gets called. An |
---|
15 | % unrecognized property name or invalid value makes property application |
---|
16 | % stop. All inputs are passed to plot_synchrotron_tune_scan_OpeningFcn via varargin. |
---|
17 | % |
---|
18 | % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one |
---|
19 | % instance to run (singleton)". |
---|
20 | % |
---|
21 | % See also: GUIDE, GUIDATA, GUIHANDLES |
---|
22 | |
---|
23 | % Edit the above text to modify the response to help plot_synchrotron_tune_scan |
---|
24 | |
---|
25 | % Last Modified by GUIDE v2.5 08-Dec-2008 15:03:31 |
---|
26 | |
---|
27 | % Begin initialization code - DO NOT EDIT |
---|
28 | gui_Singleton = 1; |
---|
29 | gui_State = struct('gui_Name', mfilename, ... |
---|
30 | 'gui_Singleton', gui_Singleton, ... |
---|
31 | 'gui_OpeningFcn', @plot_synchrotron_tune_scan_OpeningFcn, ... |
---|
32 | 'gui_OutputFcn', @plot_synchrotron_tune_scan_OutputFcn, ... |
---|
33 | 'gui_LayoutFcn', [] , ... |
---|
34 | 'gui_Callback', []); |
---|
35 | if nargin && ischar(varargin{1}) |
---|
36 | gui_State.gui_Callback = str2func(varargin{1}); |
---|
37 | end |
---|
38 | |
---|
39 | if nargout |
---|
40 | [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); |
---|
41 | else |
---|
42 | gui_mainfcn(gui_State, varargin{:}); |
---|
43 | end |
---|
44 | % End initialization code - DO NOT EDIT |
---|
45 | |
---|
46 | |
---|
47 | % --- Executes just before plot_synchrotron_tune_scan is made visible. |
---|
48 | function plot_synchrotron_tune_scan_OpeningFcn(hObject, eventdata, handles, varargin) |
---|
49 | % This function has no output args, see OutputFcn. |
---|
50 | % hObject handle to figure |
---|
51 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
52 | % handles structure with handles and user data (see GUIDATA) |
---|
53 | % varargin command line arguments to plot_synchrotron_tune_scan (see VARARGIN) |
---|
54 | |
---|
55 | % Choose default command line output for plot_synchrotron_tune_scan |
---|
56 | handles.output = hObject; |
---|
57 | |
---|
58 | BPM='ANS-C09/DG/BPM.NOD'; |
---|
59 | |
---|
60 | |
---|
61 | % get BPM value |
---|
62 | rep = tango_read_attribute2(BPM,'DDBufferSize');pro=rep.value(1); |
---|
63 | set(handles.edit_profondeur,'String',num2str(pro)) |
---|
64 | rep = tango_read_attribute2(BPM,'DDDecimationFactor');dec=rep.value(1); |
---|
65 | set(handles.edit_decimation,'String',num2str(dec)) |
---|
66 | rep = tango_read_attribute2('ANS-C13/SY/LOCAL.DG.1', 'dcctEvent');adr=rep.value(1); |
---|
67 | set(handles.edit_adress,'String',num2str(adr)) |
---|
68 | |
---|
69 | temp=tango_read_attribute2('ANS/RF/MasterClock','phaseFrequency');freq=temp.value(1); |
---|
70 | set(handles.edit_freq,'String',num2str(freq)) |
---|
71 | temp=tango_read_attribute2('ANS/RF/MasterClock','phaseVariation');amp=temp.value(1); |
---|
72 | set(handles.edit_amp,'String',num2str(amp)) |
---|
73 | |
---|
74 | handles.bpm=BPM; |
---|
75 | setappdata(handles.figure1, 'amp_scan', []); |
---|
76 | |
---|
77 | % Update handles structure |
---|
78 | guidata(hObject, handles); |
---|
79 | |
---|
80 | % UIWAIT makes plot_synchrotron_tune_scan wait for user response (see UIRESUME) |
---|
81 | % uiwait(handles.figure1); |
---|
82 | |
---|
83 | |
---|
84 | % --- Outputs from this function are returned to the command line. |
---|
85 | function varargout = plot_synchrotron_tune_scan_OutputFcn(hObject, eventdata, handles) |
---|
86 | % varargout cell array for returning output args (see VARARGOUT); |
---|
87 | % hObject handle to figure |
---|
88 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
89 | % handles structure with handles and user data (see GUIDATA) |
---|
90 | |
---|
91 | % Get default command line output from handles structure |
---|
92 | varargout{1} = handles.output; |
---|
93 | |
---|
94 | |
---|
95 | % --- Executes on button press in pushbutton_plot. |
---|
96 | function pushbutton_plot_Callback(hObject, eventdata, handles) |
---|
97 | % hObject handle to pushbutton_plot (see GCBO) |
---|
98 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
99 | % handles structure with handles and user data (see GUIDATA) |
---|
100 | |
---|
101 | % Hint: get(hObject,'Value') returns toggle state of pushbutton_plot |
---|
102 | BPM=handles.bpm; |
---|
103 | rep = tango_read_attribute2(BPM,'DDDecimationFactor');dec=rep.value(1); |
---|
104 | rep = tango_read_attribute2(BPM,'XPosDD'); |
---|
105 | N = length(rep.value); |
---|
106 | |
---|
107 | minfreq=str2double(get(handles.edit_minfreq,'String')); |
---|
108 | maxfreq=str2double(get(handles.edit_maxfreq,'String')); |
---|
109 | |
---|
110 | |
---|
111 | Xvalue = zeros(1,N); |
---|
112 | for ik =1:3, % averaging |
---|
113 | rep = tango_read_attribute2(BPM,'XPosDD'); |
---|
114 | Xvalue = Xvalue + rep.value; |
---|
115 | pause(0.3) |
---|
116 | end |
---|
117 | |
---|
118 | Xvalue = Xvalue/3; |
---|
119 | Amp=abs(fft(Xvalue)); |
---|
120 | |
---|
121 | frev = getrf/416; |
---|
122 | freq =(1:N)/N*frev*1e6/double(dec); |
---|
123 | len=length(freq); |
---|
124 | |
---|
125 | plot(freq(1:len/2)/1000,Amp(1:len/2)) |
---|
126 | xaxis([minfreq maxfreq]); |
---|
127 | grid on |
---|
128 | xlabel('Frequency kHz') |
---|
129 | |
---|
130 | % get max on window |
---|
131 | minf=floor(minfreq*1000*N/frev/1e6*double(dec)); |
---|
132 | maxf=floor(maxfreq*1000*N/frev/1e6*double(dec)); |
---|
133 | max_amp= max(Amp(minf:maxf)); |
---|
134 | |
---|
135 | amp_scan= getappdata(handles.figure1, 'amp_scan'); |
---|
136 | amp_scan=[amp_scan max_amp]; |
---|
137 | setappdata(handles.figure1, 'amp_scan', amp_scan); |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | |
---|
142 | function edit_profondeur_Callback(hObject, eventdata, handles) |
---|
143 | % hObject handle to edit_profondeur (see GCBO) |
---|
144 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
145 | % handles structure with handles and user data (see GUIDATA) |
---|
146 | |
---|
147 | % Hints: get(hObject,'String') returns contents of edit_profondeur as text |
---|
148 | % str2double(get(hObject,'String')) returns contents of edit_profondeur as a double |
---|
149 | |
---|
150 | |
---|
151 | % --- Executes during object creation, after setting all properties. |
---|
152 | function edit_profondeur_CreateFcn(hObject, eventdata, handles) |
---|
153 | % hObject handle to edit_profondeur (see GCBO) |
---|
154 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
155 | % handles empty - handles not created until after all CreateFcns called |
---|
156 | |
---|
157 | % Hint: edit controls usually have a white background on Windows. |
---|
158 | % See ISPC and COMPUTER. |
---|
159 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
160 | set(hObject,'BackgroundColor','white'); |
---|
161 | end |
---|
162 | |
---|
163 | |
---|
164 | |
---|
165 | function edit_decimation_Callback(hObject, eventdata, handles) |
---|
166 | % hObject handle to edit_decimation (see GCBO) |
---|
167 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
168 | % handles structure with handles and user data (see GUIDATA) |
---|
169 | |
---|
170 | % Hints: get(hObject,'String') returns contents of edit_decimation as text |
---|
171 | % str2double(get(hObject,'String')) returns contents of edit_decimation as a double |
---|
172 | |
---|
173 | |
---|
174 | % --- Executes during object creation, after setting all properties. |
---|
175 | function edit_decimation_CreateFcn(hObject, eventdata, handles) |
---|
176 | % hObject handle to edit_decimation (see GCBO) |
---|
177 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
178 | % handles empty - handles not created until after all CreateFcns called |
---|
179 | |
---|
180 | % Hint: edit controls usually have a white background on Windows. |
---|
181 | % See ISPC and COMPUTER. |
---|
182 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
183 | set(hObject,'BackgroundColor','white'); |
---|
184 | end |
---|
185 | |
---|
186 | |
---|
187 | |
---|
188 | function edit_adress_Callback(hObject, eventdata, handles) |
---|
189 | % hObject handle to edit_adress (see GCBO) |
---|
190 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
191 | % handles structure with handles and user data (see GUIDATA) |
---|
192 | |
---|
193 | % Hints: get(hObject,'String') returns contents of edit_adress as text |
---|
194 | % str2double(get(hObject,'String')) returns contents of edit_adress as a double |
---|
195 | |
---|
196 | |
---|
197 | % --- Executes during object creation, after setting all properties. |
---|
198 | function edit_adress_CreateFcn(hObject, eventdata, handles) |
---|
199 | % hObject handle to edit_adress (see GCBO) |
---|
200 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
201 | % handles empty - handles not created until after all CreateFcns called |
---|
202 | |
---|
203 | % Hint: edit controls usually have a white background on Windows. |
---|
204 | % See ISPC and COMPUTER. |
---|
205 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
206 | set(hObject,'BackgroundColor','white'); |
---|
207 | end |
---|
208 | |
---|
209 | guidata(hObject, handles); |
---|
210 | |
---|
211 | function edit_minfreq_Callback(hObject, eventdata, handles) |
---|
212 | % hObject handle to edit_minfreq (see GCBO) |
---|
213 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
214 | % handles structure with handles and user data (see GUIDATA) |
---|
215 | |
---|
216 | % Hints: get(hObject,'String') returns contents of edit_minfreq as text |
---|
217 | % str2double(get(hObject,'String')) returns contents of edit_minfreq as a double |
---|
218 | |
---|
219 | |
---|
220 | % --- Executes during object creation, after setting all properties. |
---|
221 | function edit_minfreq_CreateFcn(hObject, eventdata, handles) |
---|
222 | % hObject handle to edit_minfreq (see GCBO) |
---|
223 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
224 | % handles empty - handles not created until after all CreateFcns called |
---|
225 | |
---|
226 | % Hint: edit controls usually have a white background on Windows. |
---|
227 | % See ISPC and COMPUTER. |
---|
228 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
229 | set(hObject,'BackgroundColor','white'); |
---|
230 | end |
---|
231 | |
---|
232 | |
---|
233 | |
---|
234 | function edit_maxfreq_Callback(hObject, eventdata, handles) |
---|
235 | % hObject handle to edit_maxfreq (see GCBO) |
---|
236 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
237 | % handles structure with handles and user data (see GUIDATA) |
---|
238 | |
---|
239 | % Hints: get(hObject,'String') returns contents of edit_maxfreq as text |
---|
240 | % str2double(get(hObject,'String')) returns contents of edit_maxfreq as a double |
---|
241 | |
---|
242 | |
---|
243 | % --- Executes during object creation, after setting all properties. |
---|
244 | function edit_maxfreq_CreateFcn(hObject, eventdata, handles) |
---|
245 | % hObject handle to edit_maxfreq (see GCBO) |
---|
246 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
247 | % handles empty - handles not created until after all CreateFcns called |
---|
248 | |
---|
249 | % Hint: edit controls usually have a white background on Windows. |
---|
250 | % See ISPC and COMPUTER. |
---|
251 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
252 | set(hObject,'BackgroundColor','white'); |
---|
253 | end |
---|
254 | |
---|
255 | |
---|
256 | % --- Executes on button press in pushbutton_scan. |
---|
257 | function pushbutton_scan_Callback(hObject, eventdata, handles) |
---|
258 | % hObject handle to pushbutton_scan (see GCBO) |
---|
259 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
260 | % handles structure with handles and user data (see GUIDATA) |
---|
261 | |
---|
262 | %amp =0.0002; |
---|
263 | freq0=str2double(get(handles.edit_freq_min_scan,'String')); |
---|
264 | freqm=str2double(get(handles.edit_freq_max_scan,'String')); |
---|
265 | df =str2double(get(handles.edit_step_scan,'String')); |
---|
266 | |
---|
267 | ff = [freq0 :df:freqm]; |
---|
268 | |
---|
269 | |
---|
270 | freq_scan=ff; |
---|
271 | setappdata(handles.figure1, 'amp_scan',[]); |
---|
272 | |
---|
273 | tango_write_attribute2('ANS/RF/MasterClock','phaseFrequency',freq0);pause(2) |
---|
274 | |
---|
275 | for fs=ff |
---|
276 | |
---|
277 | tango_write_attribute2('ANS/RF/MasterClock','phaseFrequency',fs*1000); |
---|
278 | |
---|
279 | pause(2) |
---|
280 | temp=tango_read_attribute2('ANS/RF/MasterClock','phaseFrequency');freq=temp.value(1); |
---|
281 | set(handles.edit_freq,'String',num2str(freq)) |
---|
282 | temp=tango_read_attribute2('ANS/RF/MasterClock','phaseVariation');amp=temp.value(1); |
---|
283 | set(handles.edit_amp,'String',num2str(amp)) |
---|
284 | |
---|
285 | pushbutton_plot_Callback(hObject, eventdata, handles); |
---|
286 | |
---|
287 | end |
---|
288 | |
---|
289 | amp_scan= getappdata(handles.figure1, 'amp_scan'); |
---|
290 | minfreq=str2double(get(handles.edit_minfreq,'String')); |
---|
291 | maxfreq=str2double(get(handles.edit_maxfreq,'String')); |
---|
292 | |
---|
293 | plot(freq_scan,amp_scan,'-ob') |
---|
294 | %xaxis([minfreq maxfreq]); |
---|
295 | grid on |
---|
296 | xlabel('Frequency Hz') |
---|
297 | |
---|
298 | [amps,ind]=max(amp_scan); |
---|
299 | tunes=freq_scan(ind); |
---|
300 | set(handles.edit_tune,'String',num2str(tunes)) |
---|
301 | |
---|
302 | |
---|
303 | |
---|
304 | % Update handles structure |
---|
305 | guidata(handles.pushbutton_scan, handles); |
---|
306 | |
---|
307 | function edit_freq_min_scan_Callback(hObject, eventdata, handles) |
---|
308 | % hObject handle to edit_freq_min_scan (see GCBO) |
---|
309 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
310 | % handles structure with handles and user data (see GUIDATA) |
---|
311 | |
---|
312 | % Hints: get(hObject,'String') returns contents of edit_freq_min_scan as text |
---|
313 | % str2double(get(hObject,'String')) returns contents of edit_freq_min_scan as a double |
---|
314 | |
---|
315 | |
---|
316 | % --- Executes during object creation, after setting all properties. |
---|
317 | function edit_freq_min_scan_CreateFcn(hObject, eventdata, handles) |
---|
318 | % hObject handle to edit_freq_min_scan (see GCBO) |
---|
319 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
320 | % handles empty - handles not created until after all CreateFcns called |
---|
321 | |
---|
322 | % Hint: edit controls usually have a white background on Windows. |
---|
323 | % See ISPC and COMPUTER. |
---|
324 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
325 | set(hObject,'BackgroundColor','white'); |
---|
326 | end |
---|
327 | |
---|
328 | |
---|
329 | |
---|
330 | function edit_freq_max_scan_Callback(hObject, eventdata, handles) |
---|
331 | % hObject handle to edit_freq_max_scan (see GCBO) |
---|
332 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
333 | % handles structure with handles and user data (see GUIDATA) |
---|
334 | |
---|
335 | % Hints: get(hObject,'String') returns contents of edit_freq_max_scan as text |
---|
336 | % str2double(get(hObject,'String')) returns contents of edit_freq_max_scan as a double |
---|
337 | |
---|
338 | |
---|
339 | % --- Executes during object creation, after setting all properties. |
---|
340 | function edit_freq_max_scan_CreateFcn(hObject, eventdata, handles) |
---|
341 | % hObject handle to edit_freq_max_scan (see GCBO) |
---|
342 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
343 | % handles empty - handles not created until after all CreateFcns called |
---|
344 | |
---|
345 | % Hint: edit controls usually have a white background on Windows. |
---|
346 | % See ISPC and COMPUTER. |
---|
347 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
348 | set(hObject,'BackgroundColor','white'); |
---|
349 | end |
---|
350 | |
---|
351 | |
---|
352 | |
---|
353 | function edit_step_scan_Callback(hObject, eventdata, handles) |
---|
354 | % hObject handle to edit_step_scan (see GCBO) |
---|
355 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
356 | % handles structure with handles and user data (see GUIDATA) |
---|
357 | |
---|
358 | % Hints: get(hObject,'String') returns contents of edit_step_scan as text |
---|
359 | % str2double(get(hObject,'String')) returns contents of edit_step_scan as a double |
---|
360 | |
---|
361 | |
---|
362 | % --- Executes during object creation, after setting all properties. |
---|
363 | function edit_step_scan_CreateFcn(hObject, eventdata, handles) |
---|
364 | % hObject handle to edit_step_scan (see GCBO) |
---|
365 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
366 | % handles empty - handles not created until after all CreateFcns called |
---|
367 | |
---|
368 | % Hint: edit controls usually have a white background on Windows. |
---|
369 | % See ISPC and COMPUTER. |
---|
370 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
371 | set(hObject,'BackgroundColor','white'); |
---|
372 | end |
---|
373 | |
---|
374 | |
---|
375 | % --- Executes on button press in pushbutton_modulationON. |
---|
376 | function pushbutton_modulationON_Callback(hObject, eventdata, handles) |
---|
377 | % hObject handle to pushbutton_modulationON (see GCBO) |
---|
378 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
379 | % handles structure with handles and user data (see GUIDATA) |
---|
380 | |
---|
381 | |
---|
382 | tango_command_inout2('ANS/RF/MasterClock','PhaseModulationON'); |
---|
383 | |
---|
384 | % --- Executes on button press in pushbutton_modulationOFF. |
---|
385 | function pushbutton_modulationOFF_Callback(hObject, eventdata, handles) |
---|
386 | % hObject handle to pushbutton_modulationOFF (see GCBO) |
---|
387 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
388 | % handles structure with handles and user data (see GUIDATA) |
---|
389 | |
---|
390 | tango_command_inout2('ANS/RF/MasterClock','PhaseModulationOFF'); |
---|
391 | |
---|
392 | |
---|
393 | |
---|
394 | function edit_amp_Callback(hObject, eventdata, handles) |
---|
395 | % hObject handle to edit_amp (see GCBO) |
---|
396 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
397 | % handles structure with handles and user data (see GUIDATA) |
---|
398 | |
---|
399 | % Hints: get(hObject,'String') returns contents of edit_amp as text |
---|
400 | % str2double(get(hObject,'String')) returns contents of edit_amp as a double |
---|
401 | |
---|
402 | |
---|
403 | % --- Executes during object creation, after setting all properties. |
---|
404 | function edit_amp_CreateFcn(hObject, eventdata, handles) |
---|
405 | % hObject handle to edit_amp (see GCBO) |
---|
406 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
407 | % handles empty - handles not created until after all CreateFcns called |
---|
408 | |
---|
409 | % Hint: edit controls usually have a white background on Windows. |
---|
410 | % See ISPC and COMPUTER. |
---|
411 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
412 | set(hObject,'BackgroundColor','white'); |
---|
413 | end |
---|
414 | |
---|
415 | |
---|
416 | |
---|
417 | function edit_freq_Callback(hObject, eventdata, handles) |
---|
418 | % hObject handle to edit_freq (see GCBO) |
---|
419 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
420 | % handles structure with handles and user data (see GUIDATA) |
---|
421 | |
---|
422 | % Hints: get(hObject,'String') returns contents of edit_freq as text |
---|
423 | % str2double(get(hObject,'String')) returns contents of edit_freq as a double |
---|
424 | |
---|
425 | |
---|
426 | % --- Executes during object creation, after setting all properties. |
---|
427 | function edit_freq_CreateFcn(hObject, eventdata, handles) |
---|
428 | % hObject handle to edit_freq (see GCBO) |
---|
429 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
430 | % handles empty - handles not created until after all CreateFcns called |
---|
431 | |
---|
432 | % Hint: edit controls usually have a white background on Windows. |
---|
433 | % See ISPC and COMPUTER. |
---|
434 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
435 | set(hObject,'BackgroundColor','white'); |
---|
436 | end |
---|
437 | |
---|
438 | |
---|
439 | |
---|
440 | function edit_tune_Callback(hObject, eventdata, handles) |
---|
441 | % hObject handle to edit_tune (see GCBO) |
---|
442 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
443 | % handles structure with handles and user data (see GUIDATA) |
---|
444 | |
---|
445 | % Hints: get(hObject,'String') returns contents of edit_tune as text |
---|
446 | % str2double(get(hObject,'String')) returns contents of edit_tune as a double |
---|
447 | |
---|
448 | |
---|
449 | % --- Executes during object creation, after setting all properties. |
---|
450 | function edit_tune_CreateFcn(hObject, eventdata, handles) |
---|
451 | % hObject handle to edit_tune (see GCBO) |
---|
452 | % eventdata reserved - to be defined in a future version of MATLAB |
---|
453 | % handles empty - handles not created until after all CreateFcns called |
---|
454 | |
---|
455 | % Hint: edit controls usually have a white background on Windows. |
---|
456 | % See ISPC and COMPUTER. |
---|
457 | if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) |
---|
458 | set(hObject,'BackgroundColor','white'); |
---|
459 | end |
---|
460 | |
---|
461 | |
---|