annotate Code/Descriptors/Matlab/MPEG7/FromWeb/VoiceSauce/vs_Settings.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents
children
rev   line source
Dawn@4 1 function varargout = vs_Settings(varargin)
Dawn@4 2 % VS_SETTINGS M-file for vs_Settings.fig
Dawn@4 3 % VS_SETTINGS, by itself, creates a new VS_SETTINGS or raises the existing
Dawn@4 4 % singleton*.
Dawn@4 5 %
Dawn@4 6 % H = VS_SETTINGS returns the handle to a new VS_SETTINGS or the handle to
Dawn@4 7 % the existing singleton*.
Dawn@4 8 %
Dawn@4 9 % VS_SETTINGS('CALLBACK',hObject,eventData,handles,...) calls the local
Dawn@4 10 % function named CALLBACK in VS_SETTINGS.M with the given input arguments.
Dawn@4 11 %
Dawn@4 12 % VS_SETTINGS('Property','Value',...) creates a new VS_SETTINGS or raises the
Dawn@4 13 % existing singleton*. Starting from the left, property value pairs are
Dawn@4 14 % applied to the GUI before vs_Settings_OpeningFcn gets called. An
Dawn@4 15 % unrecognized property name or invalid value makes property application
Dawn@4 16 % stop. All inputs are passed to vs_Settings_OpeningFcn via varargin.
Dawn@4 17 %
Dawn@4 18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
Dawn@4 19 % instance to run (singleton)".
Dawn@4 20 %
Dawn@4 21 % See also: GUIDE, GUIDATA, GUIHANDLES
Dawn@4 22
Dawn@4 23 % Edit the above text to modify the response to help vs_Settings
Dawn@4 24
Dawn@4 25 % Last Modified by GUIDE v2.5 09-Mar-2011 22:29:50
Dawn@4 26
Dawn@4 27 % Begin initialization code - DO NOT EDIT
Dawn@4 28 gui_Singleton = 1;
Dawn@4 29 gui_State = struct('gui_Name', mfilename, ...
Dawn@4 30 'gui_Singleton', gui_Singleton, ...
Dawn@4 31 'gui_OpeningFcn', @vs_Settings_OpeningFcn, ...
Dawn@4 32 'gui_OutputFcn', @vs_Settings_OutputFcn, ...
Dawn@4 33 'gui_LayoutFcn', [] , ...
Dawn@4 34 'gui_Callback', []);
Dawn@4 35 if nargin && ischar(varargin{1})
Dawn@4 36 gui_State.gui_Callback = str2func(varargin{1});
Dawn@4 37 end
Dawn@4 38
Dawn@4 39 if nargout
Dawn@4 40 [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
Dawn@4 41 else
Dawn@4 42 gui_mainfcn(gui_State, varargin{:});
Dawn@4 43 end
Dawn@4 44 % End initialization code - DO NOT EDIT
Dawn@4 45
Dawn@4 46
Dawn@4 47 % --- Executes just before vs_Settings is made visible.
Dawn@4 48 function vs_Settings_OpeningFcn(hObject, eventdata, handles, varargin)
Dawn@4 49 % This function has no output args, see OutputFcn.
Dawn@4 50 % hObject handle to figure
Dawn@4 51 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 52 % handles structure with handles and user data (see GUIDATA)
Dawn@4 53 % varargin command line arguments to vs_Settings (see VARARGIN)
Dawn@4 54
Dawn@4 55 % Choose default command line output for vs_Settings
Dawn@4 56 handles.output = hObject;
Dawn@4 57
Dawn@4 58 % YS: get the settings from the main figure
Dawn@4 59 if (~isfield(handles, 'VSHandle'))
Dawn@4 60 VSHandle = VoiceSauce;
Dawn@4 61 handles.VSHandle = VSHandle;
Dawn@4 62 end
Dawn@4 63
Dawn@4 64 % restore the variables from initialization
Dawn@4 65 setGUIVariables(handles);
Dawn@4 66
Dawn@4 67
Dawn@4 68 %
Dawn@4 69 set(handles.uipanel_Formants,'SelectionChangeFcn',@formants_buttongroup_SelectionChangeFcn);
Dawn@4 70 set(handles.uipanel_F0,'SelectionChangeFcn',@F0_buttongroup_SelectionChangeFcn);
Dawn@4 71
Dawn@4 72 % Update handles structure
Dawn@4 73 guidata(hObject, handles);
Dawn@4 74
Dawn@4 75 % UIWAIT makes vs_Settings wait for user response (see UIRESUME)
Dawn@4 76 % uiwait(handles.figure1);
Dawn@4 77
Dawn@4 78
Dawn@4 79 % --- Outputs from this function are returned to the command line.
Dawn@4 80 function varargout = vs_Settings_OutputFcn(hObject, eventdata, handles)
Dawn@4 81 % varargout cell array for returning output args (see VARARGOUT);
Dawn@4 82 % hObject handle to figure
Dawn@4 83 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 84 % handles structure with handles and user data (see GUIDATA)
Dawn@4 85
Dawn@4 86 % Get default command line output from handles structure
Dawn@4 87 varargout{1} = handles.output;
Dawn@4 88
Dawn@4 89
Dawn@4 90
Dawn@4 91 % aligns the variables with those in VS.vars
Dawn@4 92 function setGUIVariables(handles)
Dawn@4 93 VSData = guidata(handles.VSHandle);
Dawn@4 94 vars = VSData.vars;
Dawn@4 95
Dawn@4 96 %F0
Dawn@4 97 switch(vars.F0algorithm)
Dawn@4 98 case {'F0 (Straight)'}
Dawn@4 99 set(handles.radiobutton_F0_Straight, 'Value', 1);
Dawn@4 100 case {'F0 (Snack)'}
Dawn@4 101 set(handles.radiobutton_F0_Snack, 'Value', 1);
Dawn@4 102 case {'F0 (Praat)'}
Dawn@4 103 set(handles.radiobutton_F0_Praat, 'Value', 1);
Dawn@4 104 case {'F0 (Other)'}
Dawn@4 105 set(handles.radiobutton_F0_Other, 'Value', 1);
Dawn@4 106 end
Dawn@4 107
Dawn@4 108 set(handles.edit_F0_Straight_maxF0, 'String', num2str(vars.maxstrF0));
Dawn@4 109 set(handles.edit_F0_Straight_minF0, 'String', num2str(vars.minstrF0));
Dawn@4 110 set(handles.edit_F0_Straight_maxduration, 'String', num2str(vars.maxstrdur));
Dawn@4 111
Dawn@4 112 set(handles.edit_F0_Snack_maxF0, 'String', num2str(vars.maxF0));
Dawn@4 113 set(handles.edit_F0_Snack_minF0, 'String', num2str(vars.minF0));
Dawn@4 114
Dawn@4 115 set(handles.checkbox_F0_Other_Enable, 'Value', vars.F0OtherEnable);
Dawn@4 116 set(handles.edit_F0_Other_Command, 'String', vars.F0OtherCommand);
Dawn@4 117 set(handles.edit_F0_Other_Offset, 'String', num2str(vars.F0OtherOffset));
Dawn@4 118 if (vars.F0OtherEnable == 1)
Dawn@4 119 set(handles.edit_F0_Other_Command, 'Enable', 'On');
Dawn@4 120 set(handles.edit_F0_Other_Offset, 'Enable', 'On');
Dawn@4 121 set(handles.radiobutton_F0_Other, 'Enable', 'On');
Dawn@4 122 end
Dawn@4 123
Dawn@4 124
Dawn@4 125 % Formants
Dawn@4 126 switch(vars.FMTalgorithm)
Dawn@4 127 case {'F1, F2, F3, F4 (Snack)'}
Dawn@4 128 set(handles.radiobutton_Formants_Snack, 'Value', 1);
Dawn@4 129 case {'F1, F2, F3, F4 (Praat)'}
Dawn@4 130 set(handles.radiobutton_Formants_Praat, 'Value', 1);
Dawn@4 131 case {'F1, F2, F3, F4 (Other)'}
Dawn@4 132 set(handles.radiobutton_Formants_Other, 'Value', 1);
Dawn@4 133 end
Dawn@4 134
Dawn@4 135 set(handles.edit_Formants_Snack_preemphasis, 'String', num2str(vars.preemphasis));
Dawn@4 136 set(handles.checkbox_Formants_Other_Enable, 'Value', vars.FormantsOtherEnable);
Dawn@4 137 set(handles.edit_Formants_Other_Command, 'String', vars.FormantsOtherCommand);
Dawn@4 138 set(handles.edit_Formants_Other_Offset, 'String', num2str(vars.FormantsOtherOffset));
Dawn@4 139
Dawn@4 140 if (vars.FormantsOtherEnable)
Dawn@4 141 set(handles.edit_Formants_Other_Command, 'Enable', 'On');
Dawn@4 142 set(handles.edit_Formants_Other_Offset, 'Enable', 'On');
Dawn@4 143 set(handles.radiobutton_Formants_Other, 'Enable', 'On');
Dawn@4 144 end
Dawn@4 145
Dawn@4 146 % SHR
Dawn@4 147 set(handles.edit_SHR_max_F0, 'String', num2str(vars.SHRmax));
Dawn@4 148 set(handles.edit_SHR_min_F0, 'String', num2str(vars.SHRmin));
Dawn@4 149 set(handles.edit_SHR_threshold, 'String', num2str(vars.SHRThreshold));
Dawn@4 150
Dawn@4 151 % Common
Dawn@4 152 set(handles.edit_Common_windowsize, 'String', num2str(vars.windowsize));
Dawn@4 153 set(handles.edit_Common_frameshift, 'String', num2str(vars.frameshift));
Dawn@4 154 set(handles.edit_Common_NaN, 'String', vars.NotANumber);
Dawn@4 155 set(handles.checkbox_Common_linkmatdir, 'Value', vars.linkmatdir);
Dawn@4 156 set(handles.checkbox_Common_linkwavdir, 'Value', vars.linkwavdir);
Dawn@4 157 set(handles.checkbox_Common_recursedir, 'Value', vars.recursedir);
Dawn@4 158 set(handles.edit_Common_Nperiods, 'String', num2str(vars.Nperiods));
Dawn@4 159 set(handles.edit_Common_Nperiods_EC, 'String', num2str(vars.Nperiods_EC));
Dawn@4 160
Dawn@4 161 % Textgrid
Dawn@4 162 set(handles.edit_Textgrid_ignorelist, 'String', vars.TextgridIgnoreList);
Dawn@4 163 set(handles.edit_Textgrid_tiernumber, 'String', num2str(vars.TextgridTierNumber));
Dawn@4 164
Dawn@4 165 % EGG
Dawn@4 166 set(handles.edit_EGGData_headers, 'String', vars.EGGheaders);
Dawn@4 167 set(handles.edit_EGGData_timelabel, 'String' ,vars.EGGtimelabel);
Dawn@4 168
Dawn@4 169 % Outputs
Dawn@4 170 set(handles.edit_Outputs_smoothwinsize, 'String', num2str(vars.O_smoothwinsize));
Dawn@4 171
Dawn@4 172 % Input (wav) files
Dawn@4 173 set(handles.edit_Input_searchstring, 'String', vars.I_searchstring);
Dawn@4 174
Dawn@4 175
Dawn@4 176 function edit_Common_windowsize_Callback(hObject, eventdata, handles)
Dawn@4 177 % hObject handle to edit_Common_windowsize (see GCBO)
Dawn@4 178 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 179 % handles structure with handles and user data (see GUIDATA)
Dawn@4 180
Dawn@4 181 % Hints: get(hObject,'String') returns contents of edit_Common_windowsize as text
Dawn@4 182 % str2double(get(hObject,'String')) returns contents of edit_Common_windowsize as a double
Dawn@4 183 VSData = guidata(handles.VSHandle);
Dawn@4 184 vars = VSData.vars;
Dawn@4 185 num = str2double(get(hObject, 'String'));
Dawn@4 186 if (isnan(num))
Dawn@4 187 set(hObject, 'String', num2str(vars.windowsize));
Dawn@4 188 else
Dawn@4 189 num = round(num);
Dawn@4 190 if (num > 0)
Dawn@4 191 VSData.vars.windowsize = num;
Dawn@4 192 set(hObject, 'String', num2str(num))
Dawn@4 193 guidata(handles.VSHandle, VSData);
Dawn@4 194 else
Dawn@4 195 set(hObject, 'String', num2str(num));
Dawn@4 196 end
Dawn@4 197 end
Dawn@4 198
Dawn@4 199
Dawn@4 200
Dawn@4 201 % --- Executes during object creation, after setting all properties.
Dawn@4 202 function edit_Common_windowsize_CreateFcn(hObject, eventdata, handles)
Dawn@4 203 % hObject handle to edit_Common_windowsize (see GCBO)
Dawn@4 204 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 205 % handles empty - handles not created until after all CreateFcns called
Dawn@4 206
Dawn@4 207 % Hint: edit controls usually have a white background on Windows.
Dawn@4 208 % See ISPC and COMPUTER.
Dawn@4 209 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 210 set(hObject,'BackgroundColor','white');
Dawn@4 211 end
Dawn@4 212
Dawn@4 213
Dawn@4 214
Dawn@4 215 function edit_Common_frameshift_Callback(hObject, eventdata, handles)
Dawn@4 216 % hObject handle to edit_Common_frameshift (see GCBO)
Dawn@4 217 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 218 % handles structure with handles and user data (see GUIDATA)
Dawn@4 219
Dawn@4 220 % Hints: get(hObject,'String') returns contents of edit_Common_frameshift as text
Dawn@4 221 % str2double(get(hObject,'String')) returns contents of edit_Common_frameshift as a double
Dawn@4 222 VSData = guidata(handles.VSHandle);
Dawn@4 223 vars = VSData.vars;
Dawn@4 224 num = str2double(get(hObject, 'String'));
Dawn@4 225 if (isnan(num))
Dawn@4 226 set(hObject, 'String', num2str(vars.frameshift));
Dawn@4 227 else
Dawn@4 228 num = round(num);
Dawn@4 229 if (num > 0)
Dawn@4 230 VSData.vars.frameshift = num(1);
Dawn@4 231 set(hObject, 'String', num2str(num))
Dawn@4 232 guidata(handles.VSHandle, VSData);
Dawn@4 233 else
Dawn@4 234 set(hObject, 'String', num2str(vars.frameshift));
Dawn@4 235 end
Dawn@4 236 end
Dawn@4 237
Dawn@4 238
Dawn@4 239 % --- Executes during object creation, after setting all properties.
Dawn@4 240 function edit_Common_frameshift_CreateFcn(hObject, eventdata, handles)
Dawn@4 241 % hObject handle to edit_Common_frameshift (see GCBO)
Dawn@4 242 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 243 % handles empty - handles not created until after all CreateFcns called
Dawn@4 244
Dawn@4 245 % Hint: edit controls usually have a white background on Windows.
Dawn@4 246 % See ISPC and COMPUTER.
Dawn@4 247 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 248 set(hObject,'BackgroundColor','white');
Dawn@4 249 end
Dawn@4 250
Dawn@4 251
Dawn@4 252
Dawn@4 253 function edit_Formants_Snack_preemphasis_Callback(hObject, eventdata, handles)
Dawn@4 254 % hObject handle to edit_Formants_Snack_preemphasis (see GCBO)
Dawn@4 255 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 256 % handles structure with handles and user data (see GUIDATA)
Dawn@4 257
Dawn@4 258 % Hints: get(hObject,'String') returns contents of edit_Formants_Snack_preemphasis as text
Dawn@4 259 % str2double(get(hObject,'String')) returns contents of edit_Formants_Snack_preemphasis as a double
Dawn@4 260 VSData = guidata(handles.VSHandle);
Dawn@4 261 vars = VSData.vars;
Dawn@4 262 num = str2num(get(hObject, 'String'));
Dawn@4 263 if (isempty(num))
Dawn@4 264 set(hObject, 'String', num2str(vars.preemphasis));
Dawn@4 265 else
Dawn@4 266 num = num(1);
Dawn@4 267 VSData.vars.preemphasis = num;
Dawn@4 268 set(hObject, 'String', num2str(num))
Dawn@4 269 guidata(handles.VSHandle, VSData);
Dawn@4 270 end
Dawn@4 271
Dawn@4 272
Dawn@4 273
Dawn@4 274 % --- Executes during object creation, after setting all properties.
Dawn@4 275 function edit_Formants_Snack_preemphasis_CreateFcn(hObject, eventdata, handles)
Dawn@4 276 % hObject handle to edit_Formants_Snack_preemphasis (see GCBO)
Dawn@4 277 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 278 % handles empty - handles not created until after all CreateFcns called
Dawn@4 279
Dawn@4 280 % Hint: edit controls usually have a white background on Windows.
Dawn@4 281 % See ISPC and COMPUTER.
Dawn@4 282 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 283 set(hObject,'BackgroundColor','white');
Dawn@4 284 end
Dawn@4 285
Dawn@4 286
Dawn@4 287
Dawn@4 288 function edit_F0_Straight_maxF0_Callback(hObject, eventdata, handles)
Dawn@4 289 % hObject handle to edit_F0_Straight_maxF0 (see GCBO)
Dawn@4 290 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 291 % handles structure with handles and user data (see GUIDATA)
Dawn@4 292
Dawn@4 293 % Hints: get(hObject,'String') returns contents of edit_F0_Straight_maxF0 as text
Dawn@4 294 % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_maxF0 as a double
Dawn@4 295 VSData = guidata(handles.VSHandle);
Dawn@4 296 vars = VSData.vars;
Dawn@4 297 num = str2num(get(hObject, 'String'));
Dawn@4 298 if (isempty(num))
Dawn@4 299 set(hObject, 'String', num2str(vars.maxstrF0));
Dawn@4 300 else
Dawn@4 301 num = num(1);
Dawn@4 302 VSData.vars.maxstrF0 = num;
Dawn@4 303 set(hObject, 'String', num2str(num))
Dawn@4 304 guidata(handles.VSHandle, VSData);
Dawn@4 305 end
Dawn@4 306
Dawn@4 307
Dawn@4 308 % --- Executes during object creation, after setting all properties.
Dawn@4 309 function edit_F0_Straight_maxF0_CreateFcn(hObject, eventdata, handles)
Dawn@4 310 % hObject handle to edit_F0_Straight_maxF0 (see GCBO)
Dawn@4 311 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 312 % handles empty - handles not created until after all CreateFcns called
Dawn@4 313
Dawn@4 314 % Hint: edit controls usually have a white background on Windows.
Dawn@4 315 % See ISPC and COMPUTER.
Dawn@4 316 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 317 set(hObject,'BackgroundColor','white');
Dawn@4 318 end
Dawn@4 319
Dawn@4 320
Dawn@4 321
Dawn@4 322 function edit_F0_Straight_minF0_Callback(hObject, eventdata, handles)
Dawn@4 323 % hObject handle to edit_F0_Straight_minF0 (see GCBO)
Dawn@4 324 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 325 % handles structure with handles and user data (see GUIDATA)
Dawn@4 326
Dawn@4 327 % Hints: get(hObject,'String') returns contents of edit_F0_Straight_minF0 as text
Dawn@4 328 % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_minF0 as a double
Dawn@4 329 VSData = guidata(handles.VSHandle);
Dawn@4 330 vars = VSData.vars;
Dawn@4 331 num = str2num(get(hObject, 'String'));
Dawn@4 332 if (isempty(num))
Dawn@4 333 set(hObject, 'String', num2str(vars.minstrF0));
Dawn@4 334 else
Dawn@4 335 num = num(1);
Dawn@4 336 VSData.vars.minstrF0 = num;
Dawn@4 337 set(hObject, 'String', num2str(num))
Dawn@4 338 guidata(handles.VSHandle, VSData);
Dawn@4 339 end
Dawn@4 340
Dawn@4 341
Dawn@4 342 % --- Executes during object creation, after setting all properties.
Dawn@4 343 function edit_F0_Straight_minF0_CreateFcn(hObject, eventdata, handles)
Dawn@4 344 % hObject handle to edit_F0_Straight_minF0 (see GCBO)
Dawn@4 345 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 346 % handles empty - handles not created until after all CreateFcns called
Dawn@4 347
Dawn@4 348 % Hint: edit controls usually have a white background on Windows.
Dawn@4 349 % See ISPC and COMPUTER.
Dawn@4 350 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 351 set(hObject,'BackgroundColor','white');
Dawn@4 352 end
Dawn@4 353
Dawn@4 354
Dawn@4 355 % --- Executes on button press in radiobutton_F0_Straight.
Dawn@4 356 function radiobutton_F0_Straight_Callback(hObject, eventdata, handles)
Dawn@4 357 % hObject handle to radiobutton_F0_Straight (see GCBO)
Dawn@4 358 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 359 % handles structure with handles and user data (see GUIDATA)
Dawn@4 360
Dawn@4 361 % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Straight
Dawn@4 362
Dawn@4 363
Dawn@4 364 % --- Executes on button press in radiobutton_F0_Snack.
Dawn@4 365 function radiobutton_F0_Snack_Callback(hObject, eventdata, handles)
Dawn@4 366 % hObject handle to radiobutton_F0_Snack (see GCBO)
Dawn@4 367 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 368 % handles structure with handles and user data (see GUIDATA)
Dawn@4 369
Dawn@4 370 % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Snack
Dawn@4 371
Dawn@4 372
Dawn@4 373 % --- Executes on button press in radiobutton_F0_Other.
Dawn@4 374 function radiobutton_F0_Other_Callback(hObject, eventdata, handles)
Dawn@4 375 % hObject handle to radiobutton_F0_Other (see GCBO)
Dawn@4 376 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 377 % handles structure with handles and user data (see GUIDATA)
Dawn@4 378
Dawn@4 379 % Hint: get(hObject,'Value') returns toggle state of radiobutton_F0_Other
Dawn@4 380
Dawn@4 381
Dawn@4 382
Dawn@4 383 function edit_F0_Straight_maxduration_Callback(hObject, eventdata, handles)
Dawn@4 384 % hObject handle to edit_F0_Straight_maxduration (see GCBO)
Dawn@4 385 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 386 % handles structure with handles and user data (see GUIDATA)
Dawn@4 387
Dawn@4 388 % Hints: get(hObject,'String') returns contents of edit_F0_Straight_maxduration as text
Dawn@4 389 % str2double(get(hObject,'String')) returns contents of edit_F0_Straight_maxduration as a double
Dawn@4 390 VSData = guidata(handles.VSHandle);
Dawn@4 391 vars = VSData.vars;
Dawn@4 392 num = str2num(get(hObject, 'String'));
Dawn@4 393 if (isempty(num))
Dawn@4 394 set(hObject, 'String', num2str(vars.maxstrdur));
Dawn@4 395 else
Dawn@4 396 num = num(1);
Dawn@4 397 VSData.vars.maxstrdur = num;
Dawn@4 398 set(hObject, 'String', num2str(num))
Dawn@4 399 guidata(handles.VSHandle, VSData);
Dawn@4 400 end
Dawn@4 401
Dawn@4 402
Dawn@4 403 % --- Executes during object creation, after setting all properties.
Dawn@4 404 function edit_F0_Straight_maxduration_CreateFcn(hObject, eventdata, handles)
Dawn@4 405 % hObject handle to edit_F0_Straight_maxduration (see GCBO)
Dawn@4 406 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 407 % handles empty - handles not created until after all CreateFcns called
Dawn@4 408
Dawn@4 409 % Hint: edit controls usually have a white background on Windows.
Dawn@4 410 % See ISPC and COMPUTER.
Dawn@4 411 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 412 set(hObject,'BackgroundColor','white');
Dawn@4 413 end
Dawn@4 414
Dawn@4 415
Dawn@4 416
Dawn@4 417 function edit_F0_Snack_maxF0_Callback(hObject, eventdata, handles)
Dawn@4 418 % hObject handle to edit_F0_Snack_maxF0 (see GCBO)
Dawn@4 419 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 420 % handles structure with handles and user data (see GUIDATA)
Dawn@4 421
Dawn@4 422 % Hints: get(hObject,'String') returns contents of edit_F0_Snack_maxF0 as text
Dawn@4 423 % str2double(get(hObject,'String')) returns contents of edit_F0_Snack_maxF0 as a double
Dawn@4 424 VSData = guidata(handles.VSHandle);
Dawn@4 425 vars = VSData.vars;
Dawn@4 426 num = str2num(get(hObject, 'String'));
Dawn@4 427 if (isempty(num))
Dawn@4 428 set(hObject, 'String', num2str(vars.maxF0));
Dawn@4 429 else
Dawn@4 430 num = num(1);
Dawn@4 431 VSData.vars.maxF0 = num;
Dawn@4 432 guidata(handles.VSHandle, VSData);
Dawn@4 433 set(hObject, 'String', num2str(num))
Dawn@4 434 end
Dawn@4 435
Dawn@4 436
Dawn@4 437 % --- Executes during object creation, after setting all properties.
Dawn@4 438 function edit_F0_Snack_maxF0_CreateFcn(hObject, eventdata, handles)
Dawn@4 439 % hObject handle to edit_F0_Snack_maxF0 (see GCBO)
Dawn@4 440 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 441 % handles empty - handles not created until after all CreateFcns called
Dawn@4 442
Dawn@4 443 % Hint: edit controls usually have a white background on Windows.
Dawn@4 444 % See ISPC and COMPUTER.
Dawn@4 445 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 446 set(hObject,'BackgroundColor','white');
Dawn@4 447 end
Dawn@4 448
Dawn@4 449
Dawn@4 450
Dawn@4 451 function edit_F0_Snack_minF0_Callback(hObject, eventdata, handles)
Dawn@4 452 % hObject handle to edit_F0_Snack_minF0 (see GCBO)
Dawn@4 453 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 454 % handles structure with handles and user data (see GUIDATA)
Dawn@4 455
Dawn@4 456 % Hints: get(hObject,'String') returns contents of edit_F0_Snack_minF0 as text
Dawn@4 457 % str2double(get(hObject,'String')) returns contents of edit_F0_Snack_minF0 as a double
Dawn@4 458 VSData = guidata(handles.VSHandle);
Dawn@4 459 vars = VSData.vars;
Dawn@4 460 num = str2num(get(hObject, 'String'));
Dawn@4 461 if (isempty(num))
Dawn@4 462 set(hObject, 'String', num2str(vars.minF0));
Dawn@4 463 else
Dawn@4 464 num = num(1);
Dawn@4 465 VSData.vars.minF0 = num;
Dawn@4 466 guidata(handles.VSHandle, VSData);
Dawn@4 467 set(hObject, 'String', num2str(num))
Dawn@4 468 end
Dawn@4 469
Dawn@4 470
Dawn@4 471 % --- Executes during object creation, after setting all properties.
Dawn@4 472 function edit_F0_Snack_minF0_CreateFcn(hObject, eventdata, handles)
Dawn@4 473 % hObject handle to edit_F0_Snack_minF0 (see GCBO)
Dawn@4 474 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 475 % handles empty - handles not created until after all CreateFcns called
Dawn@4 476
Dawn@4 477 % Hint: edit controls usually have a white background on Windows.
Dawn@4 478 % See ISPC and COMPUTER.
Dawn@4 479 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 480 set(hObject,'BackgroundColor','white');
Dawn@4 481 end
Dawn@4 482
Dawn@4 483
Dawn@4 484 % --- Executes on button press in checkbox_F0_Other_Enable.
Dawn@4 485 function checkbox_F0_Other_Enable_Callback(hObject, eventdata, handles)
Dawn@4 486 % hObject handle to checkbox_F0_Other_Enable (see GCBO)
Dawn@4 487 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 488 % handles structure with handles and user data (see GUIDATA)
Dawn@4 489
Dawn@4 490 VSData = guidata(handles.VSHandle);
Dawn@4 491
Dawn@4 492 if (get(hObject, 'Value') == 1)
Dawn@4 493 set(handles.edit_F0_Other_Command, 'Enable', 'on');
Dawn@4 494 set(handles.edit_F0_Other_Offset, 'Enable', 'on');
Dawn@4 495 set(handles.radiobutton_F0_Other, 'Enable', 'on');
Dawn@4 496 VSData.vars.F0OtherEnable = 1;
Dawn@4 497 else
Dawn@4 498 set(handles.edit_F0_Other_Command, 'Enable', 'off');
Dawn@4 499 set(handles.edit_F0_Other_Offset, 'Enable', 'off');
Dawn@4 500 set(handles.radiobutton_F0_Other, 'Enable', 'off');
Dawn@4 501 VSData.vars.F0OtherEnable = 0;
Dawn@4 502
Dawn@4 503 if (get(handles.radiobutton_F0_Other, 'Value') == 1) % switch back to Straight
Dawn@4 504 set(handles.radiobutton_F0_Straight, 'Value', 1);
Dawn@4 505 VSData.vars.F0algorithm = 'F0 (Straight)';
Dawn@4 506 end
Dawn@4 507 end
Dawn@4 508
Dawn@4 509 guidata(handles.VSHandle, VSData);
Dawn@4 510 function edit_F0_Other_Command_Callback(hObject, eventdata, handles)
Dawn@4 511 % hObject handle to edit_F0_Other_Command (see GCBO)
Dawn@4 512 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 513 % handles structure with handles and user data (see GUIDATA)
Dawn@4 514
Dawn@4 515 % Hints: get(hObject,'String') returns contents of edit_F0_Other_Command as text
Dawn@4 516 % str2double(get(hObject,'String')) returns contents of edit_F0_Other_Command as a double
Dawn@4 517 VSData = guidata(handles.VSHandle);
Dawn@4 518 vars = VSData.vars;
Dawn@4 519 VSData.vars.F0OtherCommand = get(hObject, 'String');
Dawn@4 520 guidata(handles.VSHandle, VSData);
Dawn@4 521
Dawn@4 522
Dawn@4 523 % --- Executes during object creation, after setting all properties.
Dawn@4 524 function edit_F0_Other_Command_CreateFcn(hObject, eventdata, handles)
Dawn@4 525 % hObject handle to edit_F0_Other_Command (see GCBO)
Dawn@4 526 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 527 % handles empty - handles not created until after all CreateFcns called
Dawn@4 528
Dawn@4 529 % Hint: edit controls usually have a white background on Windows.
Dawn@4 530 % See ISPC and COMPUTER.
Dawn@4 531 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 532 set(hObject,'BackgroundColor','white');
Dawn@4 533 end
Dawn@4 534
Dawn@4 535
Dawn@4 536
Dawn@4 537 function edit_F0_Other_Offset_Callback(hObject, eventdata, handles)
Dawn@4 538 % hObject handle to edit_F0_Other_Offset (see GCBO)
Dawn@4 539 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 540 % handles structure with handles and user data (see GUIDATA)
Dawn@4 541
Dawn@4 542 % Hints: get(hObject,'String') returns contents of edit_F0_Other_Offset as text
Dawn@4 543 % str2double(get(hObject,'String')) returns contents of edit_F0_Other_Offset as a double
Dawn@4 544 VSData = guidata(handles.VSHandle);
Dawn@4 545 vars = VSData.vars;
Dawn@4 546 num = str2num(get(hObject, 'String'));
Dawn@4 547 if (isempty(num))
Dawn@4 548 set(hObject, 'String', num2str(vars.F0OtherOffset));
Dawn@4 549 else
Dawn@4 550 num = num(1);
Dawn@4 551 VSData.vars.F0OtherOffset = num;
Dawn@4 552 guidata(handles.VSHandle, VSData);
Dawn@4 553 set(hObject, 'String', num2str(num))
Dawn@4 554 end
Dawn@4 555
Dawn@4 556
Dawn@4 557 % --- Executes during object creation, after setting all properties.
Dawn@4 558 function edit_F0_Other_Offset_CreateFcn(hObject, eventdata, handles)
Dawn@4 559 % hObject handle to edit_F0_Other_Offset (see GCBO)
Dawn@4 560 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 561 % handles empty - handles not created until after all CreateFcns called
Dawn@4 562
Dawn@4 563 % Hint: edit controls usually have a white background on Windows.
Dawn@4 564 % See ISPC and COMPUTER.
Dawn@4 565 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 566 set(hObject,'BackgroundColor','white');
Dawn@4 567 end
Dawn@4 568
Dawn@4 569
Dawn@4 570 % --- Executes on button press in radiobutton_Formants_Snack.
Dawn@4 571 function radiobutton_Formants_Snack_Callback(hObject, eventdata, handles)
Dawn@4 572 % hObject handle to radiobutton_Formants_Snack (see GCBO)
Dawn@4 573 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 574 % handles structure with handles and user data (see GUIDATA)
Dawn@4 575
Dawn@4 576 % Hint: get(hObject,'Value') returns toggle state of radiobutton_Formants_Snack
Dawn@4 577
Dawn@4 578
Dawn@4 579 % --- Executes on button press in radiobutton_Formants_Other.
Dawn@4 580 function radiobutton_Formants_Other_Callback(hObject, eventdata, handles)
Dawn@4 581 % hObject handle to radiobutton_Formants_Other (see GCBO)
Dawn@4 582 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 583 % handles structure with handles and user data (see GUIDATA)
Dawn@4 584
Dawn@4 585 % Hint: get(hObject,'Value') returns toggle state of radiobutton_Formants_Other
Dawn@4 586
Dawn@4 587
Dawn@4 588
Dawn@4 589 function edit_Formants_Other_Offset_Callback(hObject, eventdata, handles)
Dawn@4 590 % hObject handle to edit_Formants_Other_Offset (see GCBO)
Dawn@4 591 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 592 % handles structure with handles and user data (see GUIDATA)
Dawn@4 593
Dawn@4 594 % Hints: get(hObject,'String') returns contents of edit_Formants_Other_Offset as text
Dawn@4 595 % str2double(get(hObject,'String')) returns contents of edit_Formants_Other_Offset as a double
Dawn@4 596 VSData = guidata(handles.VSHandle);
Dawn@4 597 vars = VSData.vars;
Dawn@4 598 num = str2num(get(hObject, 'String'));
Dawn@4 599 if (isempty(num))
Dawn@4 600 set(hObject, 'String', num2str(vars.FormantsOtherOffset));
Dawn@4 601 else
Dawn@4 602 num = num(1);
Dawn@4 603 VSData.vars.FormantsOtherOffset = num;
Dawn@4 604 guidata(handles.VSHandle, VSData);
Dawn@4 605 set(hObject, 'String', num2str(num))
Dawn@4 606 end
Dawn@4 607
Dawn@4 608
Dawn@4 609 % --- Executes during object creation, after setting all properties.
Dawn@4 610 function edit_Formants_Other_Offset_CreateFcn(hObject, eventdata, handles)
Dawn@4 611 % hObject handle to edit_Formants_Other_Offset (see GCBO)
Dawn@4 612 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 613 % handles empty - handles not created until after all CreateFcns called
Dawn@4 614
Dawn@4 615 % Hint: edit controls usually have a white background on Windows.
Dawn@4 616 % See ISPC and COMPUTER.
Dawn@4 617 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 618 set(hObject,'BackgroundColor','white');
Dawn@4 619 end
Dawn@4 620
Dawn@4 621
Dawn@4 622
Dawn@4 623 function edit_Formants_Other_Command_Callback(hObject, eventdata, handles)
Dawn@4 624 % hObject handle to edit_Formants_Other_Command (see GCBO)
Dawn@4 625 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 626 % handles structure with handles and user data (see GUIDATA)
Dawn@4 627
Dawn@4 628 % Hints: get(hObject,'String') returns contents of edit_Formants_Other_Command as text
Dawn@4 629 % str2double(get(hObject,'String')) returns contents of edit_Formants_Other_Command as a double
Dawn@4 630 VSData = guidata(handles.VSHandle);
Dawn@4 631 vars = VSData.vars;
Dawn@4 632 VSData.vars.FormantsOtherCommand = get(hObject, 'String');
Dawn@4 633 guidata(handles.VSHandle, VSData);
Dawn@4 634
Dawn@4 635
Dawn@4 636 % --- Executes during object creation, after setting all properties.
Dawn@4 637 function edit_Formants_Other_Command_CreateFcn(hObject, eventdata, handles)
Dawn@4 638 % hObject handle to edit_Formants_Other_Command (see GCBO)
Dawn@4 639 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 640 % handles empty - handles not created until after all CreateFcns called
Dawn@4 641
Dawn@4 642 % Hint: edit controls usually have a white background on Windows.
Dawn@4 643 % See ISPC and COMPUTER.
Dawn@4 644 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 645 set(hObject,'BackgroundColor','white');
Dawn@4 646 end
Dawn@4 647
Dawn@4 648
Dawn@4 649 % --- Executes on button press in checkbox_Formants_Other_Enable.
Dawn@4 650 function checkbox_Formants_Other_Enable_Callback(hObject, eventdata, handles)
Dawn@4 651 % hObject handle to checkbox_Formants_Other_Enable (see GCBO)
Dawn@4 652 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 653 % handles structure with handles and user data (see GUIDATA)
Dawn@4 654
Dawn@4 655 VSData = guidata(handles.VSHandle);
Dawn@4 656
Dawn@4 657 if (get(hObject, 'Value') == 1)
Dawn@4 658 set(handles.edit_Formants_Other_Command, 'Enable', 'on');
Dawn@4 659 set(handles.edit_Formants_Other_Offset, 'Enable', 'on');
Dawn@4 660 set(handles.radiobutton_Formants_Other, 'Enable', 'on');
Dawn@4 661 VSData.vars.FormantsOtherEnable = 1;
Dawn@4 662 else
Dawn@4 663 set(handles.edit_Formants_Other_Command, 'Enable', 'off');
Dawn@4 664 set(handles.edit_Formants_Other_Offset, 'Enable', 'off');
Dawn@4 665 set(handles.radiobutton_Formants_Other, 'Enable', 'off');
Dawn@4 666 VSData.vars.FormantsOtherEnable = 0;
Dawn@4 667
Dawn@4 668 if (get(handles.radiobutton_Formants_Other, 'Value') == 1) % set back to Snack
Dawn@4 669 set(handles.radiobutton_Formants_Snack, 'Value', 1);
Dawn@4 670 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Snack)';
Dawn@4 671 end
Dawn@4 672 end
Dawn@4 673
Dawn@4 674 guidata(handles.VSHandle, VSData);
Dawn@4 675
Dawn@4 676
Dawn@4 677 function edit_Textgrid_ignorelist_Callback(hObject, eventdata, handles)
Dawn@4 678 % hObject handle to edit_Textgrid_ignorelist (see GCBO)
Dawn@4 679 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 680 % handles structure with handles and user data (see GUIDATA)
Dawn@4 681
Dawn@4 682 % Hints: get(hObject,'String') returns contents of edit_Textgrid_ignorelist as text
Dawn@4 683 % str2double(get(hObject,'String')) returns contents of edit_Textgrid_ignorelist as a double
Dawn@4 684 VSData = guidata(handles.VSHandle);
Dawn@4 685
Dawn@4 686 if (isempty(get(hObject, 'String')))
Dawn@4 687 set(hObject, 'String', '"", " ", "SIL"'); % this is the default, edit box cannot be empty
Dawn@4 688 end
Dawn@4 689
Dawn@4 690 VSData.vars.TextgridIgnoreList = get(hObject, 'String');
Dawn@4 691 guidata(handles.VSHandle, VSData);
Dawn@4 692
Dawn@4 693
Dawn@4 694 % --- Executes during object creation, after setting all properties.
Dawn@4 695 function edit_Textgrid_ignorelist_CreateFcn(hObject, eventdata, handles)
Dawn@4 696 % hObject handle to edit_Textgrid_ignorelist (see GCBO)
Dawn@4 697 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 698 % handles empty - handles not created until after all CreateFcns called
Dawn@4 699
Dawn@4 700 % Hint: edit controls usually have a white background on Windows.
Dawn@4 701 % See ISPC and COMPUTER.
Dawn@4 702 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 703 set(hObject,'BackgroundColor','white');
Dawn@4 704 end
Dawn@4 705
Dawn@4 706
Dawn@4 707
Dawn@4 708 function edit_Textgrid_tiernumber_Callback(hObject, eventdata, handles)
Dawn@4 709 % hObject handle to edit_Textgrid_tiernumber (see GCBO)
Dawn@4 710 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 711 % handles structure with handles and user data (see GUIDATA)
Dawn@4 712
Dawn@4 713 % Hints: get(hObject,'String') returns contents of edit_Textgrid_tiernumber as text
Dawn@4 714 % str2double(get(hObject,'String')) returns contents of edit_Textgrid_tiernumber as a double
Dawn@4 715 VSData = guidata(handles.VSHandle);
Dawn@4 716 vars = VSData.vars;
Dawn@4 717 num = str2num(get(hObject, 'String'));
Dawn@4 718 if (isempty(num))
Dawn@4 719 set(hObject, 'String', num2str(vars.TextgridTierNumber));
Dawn@4 720 else
Dawn@4 721 VSData.vars.TextgridTierNumber = unique(num);
Dawn@4 722 guidata(handles.VSHandle, VSData);
Dawn@4 723 set(hObject, 'String', num2str(VSData.vars.TextgridTierNumber))
Dawn@4 724 end
Dawn@4 725
Dawn@4 726
Dawn@4 727 % --- Executes during object creation, after setting all properties.
Dawn@4 728 function edit_Textgrid_tiernumber_CreateFcn(hObject, eventdata, handles)
Dawn@4 729 % hObject handle to edit_Textgrid_tiernumber (see GCBO)
Dawn@4 730 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 731 % handles empty - handles not created until after all CreateFcns called
Dawn@4 732
Dawn@4 733 % Hint: edit controls usually have a white background on Windows.
Dawn@4 734 % See ISPC and COMPUTER.
Dawn@4 735 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 736 set(hObject,'BackgroundColor','white');
Dawn@4 737 end
Dawn@4 738
Dawn@4 739
Dawn@4 740 % YS: executes on the press of a radio button in formants panel
Dawn@4 741 function formants_buttongroup_SelectionChangeFcn(hObject, eventdata)
Dawn@4 742 handles = guidata(hObject);
Dawn@4 743 VSData = guidata(handles.VSHandle);
Dawn@4 744
Dawn@4 745 switch get(eventdata.NewValue, 'Tag')
Dawn@4 746 case 'radiobutton_Formants_Snack'
Dawn@4 747 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Snack)';
Dawn@4 748 case 'radiobutton_Formants_Praat'
Dawn@4 749 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Praat)';
Dawn@4 750 case 'radiobutton_Formants_Other'
Dawn@4 751 VSData.vars.FMTalgorithm = 'F1, F2, F3, F4 (Other)';
Dawn@4 752 otherwise
Dawn@4 753 end
Dawn@4 754 guidata(handles.VSHandle, VSData);
Dawn@4 755
Dawn@4 756
Dawn@4 757
Dawn@4 758 % YS: executes on the press of a radio button in F0 panel
Dawn@4 759 function F0_buttongroup_SelectionChangeFcn(hObject, eventdata)
Dawn@4 760 handles = guidata(hObject);
Dawn@4 761 VSData = guidata(handles.VSHandle);
Dawn@4 762
Dawn@4 763 switch get(eventdata.NewValue, 'Tag')
Dawn@4 764 case 'radiobutton_F0_Straight'
Dawn@4 765 VSData.vars.F0algorithm = 'F0 (Straight)';
Dawn@4 766 case 'radiobutton_F0_Snack'
Dawn@4 767 VSData.vars.F0algorithm = 'F0 (Snack)';
Dawn@4 768 case 'radiobutton_F0_Praat'
Dawn@4 769 VSData.vars.F0algorithm = 'F0 (Praat)';
Dawn@4 770 case 'radiobutton_F0_Other'
Dawn@4 771 VSData.vars.F0algorithm = 'F0 (Other)';
Dawn@4 772 otherwise
Dawn@4 773 end
Dawn@4 774 guidata(handles.VSHandle, VSData);
Dawn@4 775
Dawn@4 776
Dawn@4 777
Dawn@4 778 % --- Executes on button press in pushbutton_Exit.
Dawn@4 779 function pushbutton_Exit_Callback(hObject, eventdata, handles)
Dawn@4 780 % hObject handle to pushbutton_Exit (see GCBO)
Dawn@4 781 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 782 % handles structure with handles and user data (see GUIDATA)
Dawn@4 783
Dawn@4 784 delete(gcf);
Dawn@4 785
Dawn@4 786
Dawn@4 787 % --------------------------------------------------------------------
Dawn@4 788 function menu_Settings_Callback(hObject, eventdata, handles)
Dawn@4 789 % hObject handle to menu_Settings (see GCBO)
Dawn@4 790 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 791 % handles structure with handles and user data (see GUIDATA)
Dawn@4 792
Dawn@4 793
Dawn@4 794 % --------------------------------------------------------------------
Dawn@4 795 function menu_Settings_Load_Callback(hObject, eventdata, handles)
Dawn@4 796 % hObject handle to menu_Settings_Load (see GCBO)
Dawn@4 797 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 798 % handles structure with handles and user data (see GUIDATA)
Dawn@4 799 VSData = guidata(handles.VSHandle);
Dawn@4 800 filename = uigetfile('*.mat', 'Select File to Load');
Dawn@4 801
Dawn@4 802 if (~ischar(filename))
Dawn@4 803 return;
Dawn@4 804 end
Dawn@4 805
Dawn@4 806 matdata = load(filename);
Dawn@4 807 VSData.vars = matdata.settings;
Dawn@4 808
Dawn@4 809 % set the machine specific variables
Dawn@4 810 if (ispc)
Dawn@4 811 VSData.vars.dirdelimiter = '\';
Dawn@4 812 else
Dawn@4 813 VSData.vars.dirdelimiter = '/';
Dawn@4 814 end
Dawn@4 815
Dawn@4 816 if (exist(VSData.vars.wavdir, 'dir') ~= 7)
Dawn@4 817 VSData.vars.wavdir = ['.' vars.dirdelimiter];
Dawn@4 818 end
Dawn@4 819
Dawn@4 820 if (exist(VSData.vars.matdir, 'dir') ~= 7)
Dawn@4 821 VSData.vars.matdir = ['.' vars.dirdelimiter];
Dawn@4 822 end
Dawn@4 823
Dawn@4 824 guidata(handles.VSHandle, VSData);
Dawn@4 825 setGUIVariables(handles);
Dawn@4 826
Dawn@4 827
Dawn@4 828 % --------------------------------------------------------------------
Dawn@4 829 function menu_Settings_Save_Callback(hObject, eventdata, handles)
Dawn@4 830 % hObject handle to menu_Settings_Save (see GCBO)
Dawn@4 831 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 832 % handles structure with handles and user data (see GUIDATA)
Dawn@4 833 VSData = guidata(handles.VSHandle);
Dawn@4 834 VSData.vars.PE_showwaveformst = 0; % this is a special case
Dawn@4 835 settings = VSData.vars;
Dawn@4 836 [filename, pathname] = uiputfile('*.mat', 'Select File to Save');
Dawn@4 837
Dawn@4 838 if (~ischar(filename))
Dawn@4 839 return;
Dawn@4 840 end
Dawn@4 841
Dawn@4 842 save([pathname filename], 'settings');
Dawn@4 843
Dawn@4 844 helpdlg('Save complete.', 'Save');
Dawn@4 845
Dawn@4 846
Dawn@4 847
Dawn@4 848 function edit_EGGData_headers_Callback(hObject, eventdata, handles)
Dawn@4 849 % hObject handle to edit_EGGData_headers (see GCBO)
Dawn@4 850 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 851 % handles structure with handles and user data (see GUIDATA)
Dawn@4 852
Dawn@4 853 % Hints: get(hObject,'String') returns contents of edit_EGGData_headers as text
Dawn@4 854 % str2double(get(hObject,'String')) returns contents of edit_EGGData_headers as a double
Dawn@4 855 VSData = guidata(handles.VSHandle);
Dawn@4 856
Dawn@4 857 if (isempty(get(hObject, 'String')))
Dawn@4 858 set(hObject, 'String', VSData.vars.EGGheaders); % this is the default, edit box cannot be empty
Dawn@4 859 end
Dawn@4 860
Dawn@4 861 VSData.vars.EGGheaders = get(hObject, 'String');
Dawn@4 862 guidata(handles.VSHandle, VSData);
Dawn@4 863
Dawn@4 864
Dawn@4 865 % --- Executes during object creation, after setting all properties.
Dawn@4 866 function edit_EGGData_headers_CreateFcn(hObject, eventdata, handles)
Dawn@4 867 % hObject handle to edit_EGGData_headers (see GCBO)
Dawn@4 868 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 869 % handles empty - handles not created until after all CreateFcns called
Dawn@4 870
Dawn@4 871 % Hint: edit controls usually have a white background on Windows.
Dawn@4 872 % See ISPC and COMPUTER.
Dawn@4 873 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 874 set(hObject,'BackgroundColor','white');
Dawn@4 875 end
Dawn@4 876
Dawn@4 877
Dawn@4 878
Dawn@4 879 function edit_EGGData_timelabel_Callback(hObject, eventdata, handles)
Dawn@4 880 % hObject handle to edit_EGGData_timelabel (see GCBO)
Dawn@4 881 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 882 % handles structure with handles and user data (see GUIDATA)
Dawn@4 883
Dawn@4 884 % Hints: get(hObject,'String') returns contents of edit_EGGData_timelabel as text
Dawn@4 885 % str2double(get(hObject,'String')) returns contents of edit_EGGData_timelabel as a double
Dawn@4 886 VSData = guidata(handles.VSHandle);
Dawn@4 887
Dawn@4 888 if (isempty(get(hObject, 'String')))
Dawn@4 889 set(hObject, 'String', VSData.vars.EGGtimelabel); % this is the default, edit box cannot be empty
Dawn@4 890 end
Dawn@4 891
Dawn@4 892 VSData.vars.EGGtimelabel = get(hObject, 'String');
Dawn@4 893 guidata(handles.VSHandle, VSData);
Dawn@4 894
Dawn@4 895
Dawn@4 896 % --- Executes during object creation, after setting all properties.
Dawn@4 897 function edit_EGGData_timelabel_CreateFcn(hObject, eventdata, handles)
Dawn@4 898 % hObject handle to edit_EGGData_timelabel (see GCBO)
Dawn@4 899 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 900 % handles empty - handles not created until after all CreateFcns called
Dawn@4 901
Dawn@4 902 % Hint: edit controls usually have a white background on Windows.
Dawn@4 903 % See ISPC and COMPUTER.
Dawn@4 904 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 905 set(hObject,'BackgroundColor','white');
Dawn@4 906 end
Dawn@4 907
Dawn@4 908
Dawn@4 909
Dawn@4 910 function edit_Common_NaN_Callback(hObject, eventdata, handles)
Dawn@4 911 % hObject handle to edit_Common_NaN (see GCBO)
Dawn@4 912 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 913 % handles structure with handles and user data (see GUIDATA)
Dawn@4 914
Dawn@4 915 % Hints: get(hObject,'String') returns contents of edit_Common_NaN as text
Dawn@4 916 % str2double(get(hObject,'String')) returns contents of edit_Common_NaN as a double
Dawn@4 917 VSData = guidata(handles.VSHandle);
Dawn@4 918 VSData.vars.NotANumber = get(hObject, 'String');
Dawn@4 919 guidata(handles.VSHandle, VSData);
Dawn@4 920
Dawn@4 921 % --- Executes during object creation, after setting all properties.
Dawn@4 922 function edit_Common_NaN_CreateFcn(hObject, eventdata, handles)
Dawn@4 923 % hObject handle to edit_Common_NaN (see GCBO)
Dawn@4 924 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 925 % handles empty - handles not created until after all CreateFcns called
Dawn@4 926
Dawn@4 927 % Hint: edit controls usually have a white background on Windows.
Dawn@4 928 % See ISPC and COMPUTER.
Dawn@4 929 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 930 set(hObject,'BackgroundColor','white');
Dawn@4 931 end
Dawn@4 932
Dawn@4 933
Dawn@4 934 % --- Executes on button press in checkbox_Common_linkmatdir.
Dawn@4 935 function checkbox_Common_linkmatdir_Callback(hObject, eventdata, handles)
Dawn@4 936 % hObject handle to checkbox_Common_linkmatdir (see GCBO)
Dawn@4 937 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 938 % handles structure with handles and user data (see GUIDATA)
Dawn@4 939
Dawn@4 940 % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_linkmatdir
Dawn@4 941 VSData = guidata(handles.VSHandle);
Dawn@4 942 VSData.vars.linkmatdir = get(hObject, 'Value');
Dawn@4 943 guidata(handles.VSHandle, VSData);
Dawn@4 944
Dawn@4 945
Dawn@4 946 % --- Executes on button press in checkbox_Common_linkwavdir.
Dawn@4 947 function checkbox_Common_linkwavdir_Callback(hObject, eventdata, handles)
Dawn@4 948 % hObject handle to checkbox_Common_linkwavdir (see GCBO)
Dawn@4 949 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 950 % handles structure with handles and user data (see GUIDATA)
Dawn@4 951
Dawn@4 952 % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_linkwavdir
Dawn@4 953 VSData = guidata(handles.VSHandle);
Dawn@4 954 VSData.vars.linkwavdir = get(hObject, 'Value');
Dawn@4 955 guidata(handles.VSHandle, VSData);
Dawn@4 956
Dawn@4 957
Dawn@4 958 % --- Executes on button press in checkbox_Common_recursedir.
Dawn@4 959 function checkbox_Common_recursedir_Callback(hObject, eventdata, handles)
Dawn@4 960 % hObject handle to checkbox_Common_recursedir (see GCBO)
Dawn@4 961 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 962 % handles structure with handles and user data (see GUIDATA)
Dawn@4 963
Dawn@4 964 % Hint: get(hObject,'Value') returns toggle state of checkbox_Common_recursedir
Dawn@4 965 VSData = guidata(handles.VSHandle);
Dawn@4 966 VSData.vars.recursedir = get(hObject, 'Value');
Dawn@4 967 guidata(handles.VSHandle, VSData);
Dawn@4 968
Dawn@4 969
Dawn@4 970
Dawn@4 971 function edit_Outputs_smoothwinsize_Callback(hObject, eventdata, handles)
Dawn@4 972 % hObject handle to edit_Outputs_smoothwinsize (see GCBO)
Dawn@4 973 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 974 % handles structure with handles and user data (see GUIDATA)
Dawn@4 975
Dawn@4 976 VSData = guidata(handles.VSHandle);
Dawn@4 977 num = str2double(get(hObject, 'String'));
Dawn@4 978
Dawn@4 979 if (~isnan(num))
Dawn@4 980 num = round(num);
Dawn@4 981 if (num >= 0) % 0 denotes no output smoothing
Dawn@4 982 set(hObject, 'String', num2str(num));
Dawn@4 983 VSData.vars.O_smoothwinsize = num;
Dawn@4 984 guidata(handles.VSHandle, VSData);
Dawn@4 985 else
Dawn@4 986 set(hObject, 'String', num2str(vars.O_smoothwinsize));
Dawn@4 987 end
Dawn@4 988 else
Dawn@4 989 set(hObject, 'String', num2str(vars.O_smoothwinsize));
Dawn@4 990 end
Dawn@4 991
Dawn@4 992
Dawn@4 993
Dawn@4 994 % --- Executes during object creation, after setting all properties.
Dawn@4 995 function edit_Outputs_smoothwinsize_CreateFcn(hObject, eventdata, handles)
Dawn@4 996 % hObject handle to edit_Outputs_smoothwinsize (see GCBO)
Dawn@4 997 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 998 % handles empty - handles not created until after all CreateFcns called
Dawn@4 999
Dawn@4 1000 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1001 % See ISPC and COMPUTER.
Dawn@4 1002 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1003 set(hObject,'BackgroundColor','white');
Dawn@4 1004 end
Dawn@4 1005
Dawn@4 1006
Dawn@4 1007
Dawn@4 1008 function edit_Input_searchstring_Callback(hObject, eventdata, handles)
Dawn@4 1009 % hObject handle to edit_Input_searchstring (see GCBO)
Dawn@4 1010 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1011 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1012
Dawn@4 1013 VSData = guidata(handles.VSHandle);
Dawn@4 1014 str = get(hObject, 'String');
Dawn@4 1015 if (isempty(str))
Dawn@4 1016 set(hObject, 'String', VSData.vars.I_searchstring);
Dawn@4 1017 else
Dawn@4 1018 VSData.vars.I_searchstring = str;
Dawn@4 1019 guidata(handles.VSHandle, VSData);
Dawn@4 1020 end
Dawn@4 1021
Dawn@4 1022
Dawn@4 1023
Dawn@4 1024 % --- Executes during object creation, after setting all properties.
Dawn@4 1025 function edit_Input_searchstring_CreateFcn(hObject, eventdata, handles)
Dawn@4 1026 % hObject handle to edit_Input_searchstring (see GCBO)
Dawn@4 1027 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1028 % handles empty - handles not created until after all CreateFcns called
Dawn@4 1029
Dawn@4 1030 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1031 % See ISPC and COMPUTER.
Dawn@4 1032 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1033 set(hObject,'BackgroundColor','white');
Dawn@4 1034 end
Dawn@4 1035
Dawn@4 1036
Dawn@4 1037
Dawn@4 1038 % --- Executes on button press in pushbutton_Settings_Praat.
Dawn@4 1039 function pushbutton_Settings_Praat_Callback(hObject, eventdata, handles)
Dawn@4 1040 % hObject handle to pushbutton_Settings_Praat (see GCBO)
Dawn@4 1041 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1042 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1043 vs_Settings_Praat();
Dawn@4 1044
Dawn@4 1045
Dawn@4 1046
Dawn@4 1047 function edit_SHR_min_F0_Callback(hObject, eventdata, handles)
Dawn@4 1048 % hObject handle to edit_SHR_min_F0 (see GCBO)
Dawn@4 1049 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1050 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1051
Dawn@4 1052 % Hints: get(hObject,'String') returns contents of edit_SHR_min_F0 as text
Dawn@4 1053 % str2double(get(hObject,'String')) returns contents of edit_SHR_min_F0 as a double
Dawn@4 1054 VSData = guidata(handles.VSHandle);
Dawn@4 1055 vars = VSData.vars;
Dawn@4 1056 num = str2double(get(hObject, 'String'));
Dawn@4 1057 if (isempty(num) || num < 0)
Dawn@4 1058 set(hObject, 'String', num2str(vars.SHRmin));
Dawn@4 1059 else
Dawn@4 1060 VSData.vars.SHRmin = num;
Dawn@4 1061 guidata(handles.VSHandle, VSData);
Dawn@4 1062 set(hObject, 'String', num2str(num))
Dawn@4 1063 end
Dawn@4 1064
Dawn@4 1065
Dawn@4 1066 % --- Executes during object creation, after setting all properties.
Dawn@4 1067 function edit_SHR_min_F0_CreateFcn(hObject, eventdata, handles)
Dawn@4 1068 % hObject handle to edit_SHR_min_F0 (see GCBO)
Dawn@4 1069 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1070 % handles empty - handles not created until after all CreateFcns called
Dawn@4 1071
Dawn@4 1072 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1073 % See ISPC and COMPUTER.
Dawn@4 1074 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1075 set(hObject,'BackgroundColor','white');
Dawn@4 1076 end
Dawn@4 1077
Dawn@4 1078
Dawn@4 1079
Dawn@4 1080 function edit_SHR_max_F0_Callback(hObject, eventdata, handles)
Dawn@4 1081 % hObject handle to edit_SHR_max_F0 (see GCBO)
Dawn@4 1082 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1083 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1084
Dawn@4 1085 % Hints: get(hObject,'String') returns contents of edit_SHR_max_F0 as text
Dawn@4 1086 % str2double(get(hObject,'String')) returns contents of edit_SHR_max_F0 as a double
Dawn@4 1087 VSData = guidata(handles.VSHandle);
Dawn@4 1088 vars = VSData.vars;
Dawn@4 1089 num = str2double(get(hObject, 'String'));
Dawn@4 1090 if (isempty(num) || num < 0)
Dawn@4 1091 set(hObject, 'String', num2str(vars.SHRmax));
Dawn@4 1092 else
Dawn@4 1093 VSData.vars.SHRmax = num;
Dawn@4 1094 guidata(handles.VSHandle, VSData);
Dawn@4 1095 set(hObject, 'String', num2str(num))
Dawn@4 1096 end
Dawn@4 1097
Dawn@4 1098
Dawn@4 1099 % --- Executes during object creation, after setting all properties.
Dawn@4 1100 function edit_SHR_max_F0_CreateFcn(hObject, eventdata, handles)
Dawn@4 1101 % hObject handle to edit_SHR_max_F0 (see GCBO)
Dawn@4 1102 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1103 % handles empty - handles not created until after all CreateFcns called
Dawn@4 1104
Dawn@4 1105 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1106 % See ISPC and COMPUTER.
Dawn@4 1107 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1108 set(hObject,'BackgroundColor','white');
Dawn@4 1109 end
Dawn@4 1110
Dawn@4 1111
Dawn@4 1112
Dawn@4 1113 function edit_SHR_threshold_Callback(hObject, eventdata, handles)
Dawn@4 1114 % hObject handle to edit_SHR_threshold (see GCBO)
Dawn@4 1115 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1116 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1117
Dawn@4 1118 % Hints: get(hObject,'String') returns contents of edit_SHR_threshold as text
Dawn@4 1119 % str2double(get(hObject,'String')) returns contents of edit_SHR_threshold as a double
Dawn@4 1120 VSData = guidata(handles.VSHandle);
Dawn@4 1121 vars = VSData.vars;
Dawn@4 1122 num = str2double(get(hObject, 'String'));
Dawn@4 1123 if (isempty(num) || num < 0)
Dawn@4 1124 set(hObject, 'String', num2str(vars.SHRThreshold));
Dawn@4 1125 else
Dawn@4 1126 VSData.vars.SHRThreshold = num;
Dawn@4 1127 guidata(handles.VSHandle, VSData);
Dawn@4 1128 set(hObject, 'String', num2str(num))
Dawn@4 1129 end
Dawn@4 1130
Dawn@4 1131
Dawn@4 1132 % --- Executes during object creation, after setting all properties.
Dawn@4 1133 function edit_SHR_threshold_CreateFcn(hObject, eventdata, handles)
Dawn@4 1134 % hObject handle to edit_SHR_threshold (see GCBO)
Dawn@4 1135 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1136 % handles empty - handles not created until after all CreateFcns called
Dawn@4 1137
Dawn@4 1138 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1139 % See ISPC and COMPUTER.
Dawn@4 1140 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1141 set(hObject,'BackgroundColor','white');
Dawn@4 1142 end
Dawn@4 1143
Dawn@4 1144
Dawn@4 1145
Dawn@4 1146 function edit_Common_Nperiods_Callback(hObject, eventdata, handles)
Dawn@4 1147 % hObject handle to edit_Common_Nperiods (see GCBO)
Dawn@4 1148 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1149 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1150
Dawn@4 1151 % Hints: get(hObject,'String') returns contents of edit_Common_Nperiods as text
Dawn@4 1152 % str2double(get(hObject,'String')) returns contents of edit_Common_Nperiods as a double
Dawn@4 1153 VSData = guidata(handles.VSHandle);
Dawn@4 1154 vars = VSData.vars;
Dawn@4 1155 num = str2double(get(hObject, 'String'));
Dawn@4 1156 if (isempty(num) || round(num) < 0)
Dawn@4 1157 set(hObject, 'String', num2str(vars.Nperiods));
Dawn@4 1158 else
Dawn@4 1159 VSData.vars.Nperiods = round(num);
Dawn@4 1160 guidata(handles.VSHandle, VSData);
Dawn@4 1161 set(hObject, 'String', num2str(round(num)))
Dawn@4 1162 end
Dawn@4 1163
Dawn@4 1164
Dawn@4 1165 % --- Executes during object creation, after setting all properties.
Dawn@4 1166 function edit_Common_Nperiods_CreateFcn(hObject, eventdata, handles)
Dawn@4 1167 % hObject handle to edit_Common_Nperiods (see GCBO)
Dawn@4 1168 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1169 % handles empty - handles not created until after all CreateFcns called
Dawn@4 1170
Dawn@4 1171 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1172 % See ISPC and COMPUTER.
Dawn@4 1173 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1174 set(hObject,'BackgroundColor','white');
Dawn@4 1175 end
Dawn@4 1176
Dawn@4 1177
Dawn@4 1178
Dawn@4 1179 function edit_Common_Nperiods_EC_Callback(hObject, eventdata, handles)
Dawn@4 1180 % hObject handle to edit_Common_Nperiods_EC (see GCBO)
Dawn@4 1181 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1182 % handles structure with handles and user data (see GUIDATA)
Dawn@4 1183
Dawn@4 1184 % Hints: get(hObject,'String') returns contents of edit_Common_Nperiods_EC as text
Dawn@4 1185 % str2double(get(hObject,'String')) returns contents of edit_Common_Nperiods_EC as a double
Dawn@4 1186 VSData = guidata(handles.VSHandle);
Dawn@4 1187 vars = VSData.vars;
Dawn@4 1188 num = str2double(get(hObject, 'String'));
Dawn@4 1189 if (isempty(num) || round(num) < 0)
Dawn@4 1190 set(hObject, 'String', num2str(vars.Nperiods_EC));
Dawn@4 1191 else
Dawn@4 1192 VSData.vars.Nperiods_EC = round(num);
Dawn@4 1193 guidata(handles.VSHandle, VSData);
Dawn@4 1194 set(hObject, 'String', num2str(round(num)))
Dawn@4 1195 end
Dawn@4 1196
Dawn@4 1197
Dawn@4 1198 % --- Executes during object creation, after setting all properties.
Dawn@4 1199 function edit_Common_Nperiods_EC_CreateFcn(hObject, eventdata, handles)
Dawn@4 1200 % hObject handle to edit_Common_Nperiods_EC (see GCBO)
Dawn@4 1201 % eventdata reserved - to be defined in a future version of MATLAB
Dawn@4 1202 % handles empty - handles not created until after all CreateFcns called
Dawn@4 1203
Dawn@4 1204 % Hint: edit controls usually have a white background on Windows.
Dawn@4 1205 % See ISPC and COMPUTER.
Dawn@4 1206 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
Dawn@4 1207 set(hObject,'BackgroundColor','white');
Dawn@4 1208 end