Home > TNNT_1_07 > FrontEnd > ThNN_GUI.m

ThNN_GUI

PURPOSE ^

THNN_GUI creates a GUI for training theta neuron networks

SYNOPSIS ^

function varargout = ThNN_GUI(varargin)

DESCRIPTION ^

THNN_GUI creates a GUI for training theta neuron networks

Description:
Function to create a GUI for training theta neuron networks. This code was
adapted from code automatically generated by the Matlab GUIDE tool.

Syntax:
ThNN_GUI;
GUIHandle=ThNN_GUI;

Input Parameters:
o None

Output Parameters:
o GUIHandle: Handle to the GUI figure. The UserData of the GUI is a 1x2
    cell array containing the GUI revision and the Handles structure.

Example:
>> GUIHandle=ThNN_GUI;
>> Temp=get(GUIHandle,'UserData');
>> Revision=Temp{1};
>> Handles=Temp{2};

See also theta_neuron_network

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 function varargout = ThNN_GUI(varargin)
0002 %THNN_GUI creates a GUI for training theta neuron networks
0003 %
0004 %Description:
0005 %Function to create a GUI for training theta neuron networks. This code was
0006 %adapted from code automatically generated by the Matlab GUIDE tool.
0007 %
0008 %Syntax:
0009 %ThNN_GUI;
0010 %GUIHandle=ThNN_GUI;
0011 %
0012 %Input Parameters:
0013 %o None
0014 %
0015 %Output Parameters:
0016 %o GUIHandle: Handle to the GUI figure. The UserData of the GUI is a 1x2
0017 %    cell array containing the GUI revision and the Handles structure.
0018 %
0019 %Example:
0020 %>> GUIHandle=ThNN_GUI;
0021 %>> Temp=get(GUIHandle,'UserData');
0022 %>> Revision=Temp{1};
0023 %>> Handles=Temp{2};
0024 %
0025 %See also theta_neuron_network
0026 
0027 %Copyright (C) 2008 Sam McKennoch <Samuel.McKennoch@loria.fr>
0028 
0029 
0030 % Begin initialization code - DO NOT EDIT
0031 gui_Singleton = 1;
0032 gui_State = struct('gui_Name',       mfilename, ...
0033                    'gui_Singleton',  gui_Singleton, ...
0034                    'gui_OpeningFcn', @ThNN_GUI_OpeningFcn, ...
0035                    'gui_OutputFcn',  @ThNN_GUI_OutputFcn, ...
0036                    'gui_LayoutFcn',  [] , ...
0037                    'gui_Callback',   []);
0038 if nargin && ischar(varargin{1})
0039     gui_State.gui_Callback = str2func(varargin{1});
0040 end
0041 
0042 if nargout
0043     [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
0044 else
0045     gui_mainfcn(gui_State, varargin{:});
0046 end
0047 % End initialization code - DO NOT EDIT
0048 
0049 
0050 % --- Executes just before ThNN_GUI is made visible.
0051 function ThNN_GUI_OpeningFcn(hObject, eventdata, Handles, varargin)
0052 % This function has no output args, see OutputFcn.
0053 % hObject    handle to figure
0054 % eventdata  reserved - to be defined in a future version of MATLAB
0055 % Handles    structure with Handles and user data (see GUIDATA)
0056 % varargin   command line arguments to ThNN_GUI (see VARARGIN)
0057 
0058 % Choose default command line output for ThNN_GUI
0059 Handles.output = hObject;
0060 
0061 % Update Handles structure
0062 guidata(hObject, Handles);
0063 
0064 disp('Loading Theta Neuron Network Trainer GUI...');
0065 C=filesep;
0066 Revision='1.07';
0067 global Flags;
0068 Flags=struct(...
0069     'StartTime',0,...
0070     'SaveFlag',0,...
0071     'LoadFlag',0,...
0072     'StopFlag',0,...
0073     'TrainFlag',0,...
0074     'PerturbFlag',0);
0075 DFT_TTString='The number of epochs between which the Training Status Panel is updated';
0076 set(Handles.Display_Frequency_Text,'TooltipString',DFT_TTString);
0077 TFT_TTString='The number of epochs between which test data is generated and the Axes are updated';
0078 set(Handles.Testing_Frequency_Text,'TooltipString',TFT_TTString);
0079 set(hObject,'UserData',{Revision Handles});
0080 set(hObject,'Name',['Theta Neuron Network Trainer - Revision ' Revision]);
0081 %Not sure why this isn't being set, since I specified it in GUIDE, but it's
0082 %easy to set it manually anyway.  (Maybe be because there is a space in the
0083 %menu name?)
0084 set(Handles.Gradient_Tester,'Accelerator','G');
0085 set(hObject,'resize','on');
0086 
0087 % UIWAIT makes ThNN_GUI wait for user response (see UIRESUME)
0088 % uiwait(Handles.figure1);
0089 
0090 
0091 % --- Outputs from this function are returned to the command line.
0092 function varargout = ThNN_GUI_OutputFcn(hObject, eventdata, Handles) 
0093 % varargout  cell array for returning output args (see VARARGOUT);
0094 % hObject    handle to figure
0095 % eventdata  reserved - to be defined in a future version of MATLAB
0096 % Handles    structure with Handles and user data (see GUIDATA)
0097 
0098 % Get default command line output from Handles structure
0099 varargout{1} = Handles.output;
0100 
0101 
0102 
0103 function Alpha_Callback(hObject, eventdata, Handles)
0104 % hObject    handle to Alpha (see GCBO)
0105 % eventdata  reserved - to be defined in a future version of MATLAB
0106 % Handles    structure with Handles and user data (see GUIDATA)
0107 
0108 %str2double(get(hObject,'String')) %returns contents of Alpha as a double
0109 
0110 
0111 % --- Executes during object creation, after setting all properties.
0112 function Alpha_CreateFcn(hObject, eventdata, Handles)
0113 % hObject    handle to Alpha (see GCBO)
0114 % eventdata  reserved - to be defined in a future version of MATLAB
0115 % Handles    empty - Handles not created until after all CreateFcns called
0116 
0117 % Hint: edit controls usually have a white background on Windows.
0118 %       See ISPC and COMPUTER.
0119 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0120     set(hObject,'BackgroundColor','white');
0121 end
0122 
0123 
0124 
0125 function Reference_Time_Callback(hObject, eventdata, Handles)
0126 % hObject    handle to Reference_Time (see GCBO)
0127 % eventdata  reserved - to be defined in a future version of MATLAB
0128 % Handles    structure with Handles and user data (see GUIDATA)
0129 
0130 %str2double(get(hObject,'String')) %returns contents of Reference_Time as a double
0131 
0132 
0133 % --- Executes during object creation, after setting all properties.
0134 function Reference_Time_CreateFcn(hObject, eventdata, Handles)
0135 % hObject    handle to Reference_Time (see GCBO)
0136 % eventdata  reserved - to be defined in a future version of MATLAB
0137 % Handles    empty - Handles not created until after all CreateFcns called
0138 
0139 % Hint: edit controls usually have a white background on Windows.
0140 %       See ISPC and COMPUTER.
0141 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0142     set(hObject,'BackgroundColor','white');
0143 end
0144 
0145 
0146 % --- Executes on selection change in Training_Method.
0147 function Training_Method_Callback(hObject, eventdata, Handles)
0148 % hObject    handle to Training_Method (see GCBO)
0149 % eventdata  reserved - to be defined in a future version of MATLAB
0150 % Handles    structure with Handles and user data (see GUIDATA)
0151 
0152 % Hints: contents = get(hObject,'String') returns Training_Method contents as cell array
0153 %        contents{get(hObject,'Value')} returns selected item from Training_Method
0154 
0155 
0156 % --- Executes during object creation, after setting all properties.
0157 function Training_Method_CreateFcn(hObject, eventdata, Handles)
0158 % hObject    handle to Training_Method (see GCBO)
0159 % eventdata  reserved - to be defined in a future version of MATLAB
0160 % Handles    empty - Handles not created until after all CreateFcns called
0161 
0162 % Hint: popupmenu controls usually have a white background on Windows.
0163 %       See ISPC and COMPUTER.
0164 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0165     set(hObject,'BackgroundColor','white');
0166 end
0167 
0168 
0169 
0170 function Num_Hidden_Neurons_Callback(hObject, eventdata, Handles)
0171 % hObject    handle to Num_Hidden_Neurons (see GCBO)
0172 % eventdata  reserved - to be defined in a future version of MATLAB
0173 % Handles    structure with Handles and user data (see GUIDATA)
0174 
0175 %str2double(get(hObject,'String')) %returns contents of Num_Hidden_Neurons as a double
0176 
0177 
0178 % --- Executes during object creation, after setting all properties.
0179 function Num_Hidden_Neurons_CreateFcn(hObject, eventdata, Handles)
0180 % hObject    handle to Num_Hidden_Neurons (see GCBO)
0181 % eventdata  reserved - to be defined in a future version of MATLAB
0182 % Handles    empty - Handles not created until after all CreateFcns called
0183 
0184 % Hint: edit controls usually have a white background on Windows.
0185 %       See ISPC and COMPUTER.
0186 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0187     set(hObject,'BackgroundColor','white');
0188 end
0189 
0190 
0191 % --- Executes on button press in Save_Parameters.
0192 function Save_Parameters_Callback(hObject, eventdata, Handles)
0193 % hObject    handle to Save_Parameters (see GCBO)
0194 % eventdata  reserved - to be defined in a future version of MATLAB
0195 % Handles    structure with Handles and user data (see GUIDATA)
0196 global Flags;
0197 if Flags.TrainFlag
0198     set(Handles.Simulation_Status,'String','Stop Training Before Saving!');
0199     pause(2);
0200     set(Handles.Simulation_Status,'String','Training...');
0201 else
0202     TrainingParams=get_training_params(Handles);
0203     ThNN=get_network(Handles);
0204     cd 'Parameters';
0205     [file,path_save] = uiputfile('*.mat','Save Parameters...');
0206     try
0207         save([path_save, file], 'TrainingParams', 'ThNN');
0208     end
0209     cd '..';    
0210 end
0211 
0212 % --- Executes on button press in Load_Simulation.
0213 function Load_Simulation_Callback(hObject, eventdata, Handles)
0214 % hObject    handle to Load_Simulation (see GCBO)
0215 % eventdata  reserved - to be defined in a future version of MATLAB
0216 % Handles    structure with Handles and user data (see GUIDATA)
0217 
0218 global Flags;
0219 if Flags.TrainFlag
0220     set(Handles.Simulation_Status,'String','Stop Training Before Loading!');
0221     pause(2);
0222     set(Handles.Simulation_Status,'String','Training...');
0223 else
0224     C=filesep;
0225     cd('Results');
0226     [File,PathLoad] = uigetfile('*.mat','Load Simulation...');
0227     cd('..');
0228     try
0229         load([PathLoad, File]);
0230         TrainingParams.Handles=Handles;
0231         set_params(Handles,ThNN,TrainingParams);
0232         if exist('TestingResults')
0233             plot_rmse(TrainingParams,TrainingResults,TestingResults);
0234             plot_extra(TrainingParams,tiOrder,tiAll,TrainingResults,tiAllTest,TestingResults);
0235         else
0236             plot_rmse(TrainingParams,TrainingResults);
0237             plot_extra(TrainingParams,tiOrder,tiAll,TrainingResults);
0238         end        
0239         SaveFile=[PathLoad, File];
0240         set(Handles.Continue,'UserData',SaveFile);
0241         set(Handles.Simulation_Status,'String',['Loaded ' File]);
0242         set(Handles.MSE,'String',num2str(TrainingResults.RMSE(end)));
0243         set(Handles.Current_Epoch,'String',num2str(length(TrainingResults.RMSE)));
0244         set(Handles.Current_Learning_Rate,'String',num2str(TrainingParams.WeightLearningRate));
0245         Flags.TrainFlag=0;
0246     catch
0247         set(Handles.Simulation_Status,'String',['Problem with Load File: ' File]);
0248     end
0249     pause(2);
0250     set(Handles.Simulation_Status,'String','Waiting...');
0251 end
0252 
0253 % --- Executes on button press in Stop.
0254 function Stop_Callback(hObject, eventdata, Handles)
0255 % hObject    handle to Stop (see GCBO)
0256 % eventdata  reserved - to be defined in a future version of MATLAB
0257 % Handles    structure with Handles and user data (see GUIDATA)
0258 global Flags;
0259 
0260 Flags.StopFlag=1;
0261 disp('Computation Time Since Train Was Pressed:');
0262 etime(clock,Flags.StartTime)
0263 set(Handles.Simulation_Status,'String','Preparing to Stop...');
0264 
0265 % --- Executes on button press in Load_Parameters.
0266 function Load_Parameters_Callback(hObject, eventdata, Handles)
0267 % hObject    handle to Load_Parameters (see GCBO)
0268 % eventdata  reserved - to be defined in a future version of MATLAB
0269 % Handles    structure with Handles and user data (see GUIDATA)
0270 global Flags;
0271 if Flags.TrainFlag
0272     set(Handles.Simulation_Status,'String','Stop Training Before Loading!');
0273     pause(2);
0274     set(Handles.Simulation_Status,'String','Training...');
0275 else
0276     cd 'Parameters';
0277     [file,PathLoad] = uigetfile('*.mat','Load Parameters...');
0278     cd '..';    
0279     try
0280         load([PathLoad, file]);
0281         set_params(Handles,ThNN,TrainingParams);
0282         set(Handles.Simulation_Status,'String',['Loaded ' file]);
0283     catch
0284         set(Handles.Simulation_Status,'String',['Problem with Load File: ' file]);
0285     end
0286     pause(2);
0287     set(Handles.Simulation_Status,'String','Waiting...');
0288 end
0289 
0290 % --- Executes on button press in Continue.
0291 function Continue_Callback(hObject, eventdata, Handles)
0292 % hObject    handle to Continue (see GCBO)
0293 % eventdata  reserved - to be defined in a future version of MATLAB
0294 % Handles    structure with Handles and user data (see GUIDATA)
0295 global Flags;
0296 Temp=get(Handles.Continue,'UserData');
0297 if ~isempty(Temp)
0298     try 
0299         load(Temp);
0300         TrainingParams=get_training_params(Handles);
0301         Flags.TrainFlag=1;
0302         set(Handles.Simulation_Status,'String','Training...');
0303         enable_network_parameters(Handles,'off');
0304         if exist('TestingResults')
0305             train_dataset(ThNN,TrainingParams,TrainingResults,TestingResults);
0306         else
0307             train_dataset(ThNN,TrainingParams,TrainingResults);
0308         end
0309     catch
0310         set(Handles.Simulation_Status,'String','Continue Data is Corrupt!');
0311         disp(['Continue Data (', Temp,') is Corrupt!']);
0312         LE=lasterror;
0313         disp(['The error is: ', LE.message]);
0314         enable_network_parameters(Handles,'off');
0315         Flags.TrainFlag=0;        
0316         pause(3);
0317         set(Handles.Simulation_Status,'String','Waiting...');        
0318     end
0319 else
0320     set(Handles.Simulation_Status,'String','No Data to Continue From!');
0321     pause(3);
0322     set(Handles.Simulation_Status,'String','Waiting...');
0323 end
0324 
0325 % --- Executes on button press in Train.
0326 function Train_Callback(hObject, eventdata, Handles)
0327 % hObject    handle to Train (see GCBO)
0328 % eventdata  reserved - to be defined in a future version of MATLAB
0329 % Handles    structure with Handles and user data (see GUIDATA)
0330 
0331 global Flags;
0332 Flags.StartTime=clock;
0333 set(Handles.axes3,'UserData',{});
0334 DataName=get(Handles.Input_Data,'String');
0335 if ~strcmp(DataName,'None')
0336     Flags.TrainFlag=1;
0337     set(Handles.Simulation_Status,'String','Training...');
0338     ThNN=get_network(Handles);
0339     TrainingParams=get_training_params(Handles);
0340     enable_network_parameters(Handles,'off');
0341     train_dataset(ThNN,TrainingParams);
0342 else
0343     set(Handles.Simulation_Status,'String','No Training Data Selected!');
0344     pause(3);
0345     set(Handles.Simulation_Status,'String','Waiting...');
0346 end
0347 
0348 
0349 function edit7_Callback(hObject, eventdata, Handles)
0350 % hObject    handle to edit7 (see GCBO)
0351 % eventdata  reserved - to be defined in a future version of MATLAB
0352 % Handles    structure with Handles and user data (see GUIDATA)
0353 
0354 % Hints: get(hObject,'String') returns contents of edit7 as text
0355 %        str2double(get(hObject,'String')) returns contents of edit7 as a double
0356 
0357 
0358 % --- Executes during object creation, after setting all properties.
0359 function edit7_CreateFcn(hObject, eventdata, Handles)
0360 % hObject    handle to edit7 (see GCBO)
0361 % eventdata  reserved - to be defined in a future version of MATLAB
0362 % Handles    empty - Handles not created until after all CreateFcns called
0363 
0364 % Hint: edit controls usually have a white background on Windows.
0365 %       See ISPC and COMPUTER.
0366 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0367     set(hObject,'BackgroundColor','white');
0368 end
0369 
0370 
0371 
0372 function Num_Epochs_Callback(hObject, eventdata, Handles)
0373 % hObject    handle to Num_Epochs (see GCBO)
0374 % eventdata  reserved - to be defined in a future version of MATLAB
0375 % Handles    structure with Handles and user data (see GUIDATA)
0376 
0377 %str2double(get(hObject,'String')) %returns contents of Num_Epochs as a double
0378 
0379 
0380 % --- Executes during object creation, after setting all properties.
0381 function Num_Epochs_CreateFcn(hObject, eventdata, Handles)
0382 % hObject    handle to Num_Epochs (see GCBO)
0383 % eventdata  reserved - to be defined in a future version of MATLAB
0384 % Handles    empty - Handles not created until after all CreateFcns called
0385 
0386 % Hint: edit controls usually have a white background on Windows.
0387 %       See ISPC and COMPUTER.
0388 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0389     set(hObject,'BackgroundColor','white');
0390 end
0391 
0392 
0393 
0394 function Learning_Rate_Callback(hObject, eventdata, Handles)
0395 % hObject    handle to Learning_Rate (see GCBO)
0396 % eventdata  reserved - to be defined in a future version of MATLAB
0397 % Handles    structure with Handles and user data (see GUIDATA)
0398 
0399 % Hints: get(hObject,'String') returns contents of Learning_Rate as text
0400 %        str2double(get(hObject,'String')) returns contents of Learning_Rate as a double
0401 
0402 
0403 % --- Executes during object creation, after setting all properties.
0404 function Learning_Rate_CreateFcn(hObject, eventdata, Handles)
0405 % hObject    handle to Learning_Rate (see GCBO)
0406 % eventdata  reserved - to be defined in a future version of MATLAB
0407 % Handles    empty - Handles not created until after all CreateFcns called
0408 
0409 % Hint: edit controls usually have a white background on Windows.
0410 %       See ISPC and COMPUTER.
0411 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0412     set(hObject,'BackgroundColor','white');
0413 end
0414 
0415 
0416 function Initial_Weight_Callback(hObject, eventdata, Handles)
0417 % hObject    handle to Initial_Weight (see GCBO)
0418 % eventdata  reserved - to be defined in a future version of MATLAB
0419 % Handles    structure with Handles and user data (see GUIDATA)
0420 
0421 % Hints: get(hObject,'String') returns contents of Initial_Weight as text
0422 %        str2double(get(hObject,'String')) returns contents of Initial_Weight as a double
0423 
0424 
0425 % --- Executes during object creation, after setting all properties.
0426 function Initial_Weight_CreateFcn(hObject, eventdata, Handles)
0427 % hObject    handle to Initial_Weight (see GCBO)
0428 % eventdata  reserved - to be defined in a future version of MATLAB
0429 % Handles    empty - Handles not created until after all CreateFcns called
0430 
0431 % Hint: edit controls usually have a white background on Windows.
0432 %       See ISPC and COMPUTER.
0433 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0434     set(hObject,'BackgroundColor','white');
0435 end
0436 
0437 
0438 
0439 function Initial_Tau_Callback(hObject, eventdata, Handles)
0440 % hObject    handle to Initial_Tau (see GCBO)
0441 % eventdata  reserved - to be defined in a future version of MATLAB
0442 % Handles    structure with Handles and user data (see GUIDATA)
0443 
0444 % Hints: get(hObject,'String') returns contents of Initial_Tau as text
0445 %        str2double(get(hObject,'String')) returns contents of Initial_Tau as a double
0446 
0447 
0448 % --- Executes during object creation, after setting all properties.
0449 function Initial_Tau_CreateFcn(hObject, eventdata, Handles)
0450 % hObject    handle to Initial_Tau (see GCBO)
0451 % eventdata  reserved - to be defined in a future version of MATLAB
0452 % Handles    empty - Handles not created until after all CreateFcns called
0453 
0454 % Hint: edit controls usually have a white background on Windows.
0455 %       See ISPC and COMPUTER.
0456 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0457     set(hObject,'BackgroundColor','white');
0458 end
0459 
0460 
0461 
0462 function Initialize_Tau_Type_Callback(hObject, eventdata, Handles)
0463 % hObject    handle to Initialize_Tau_Type (see GCBO)
0464 % eventdata  reserved - to be defined in a future version of MATLAB
0465 % Handles    structure with Handles and user data (see GUIDATA)
0466 
0467 % Hints: get(hObject,'String') returns contents of Initialize_Tau_Type as text
0468 %        str2double(get(hObject,'String')) returns contents of Initialize_Tau_Type as a double
0469 
0470 
0471 % --- Executes during object creation, after setting all properties.
0472 function Initialize_Tau_Type_CreateFcn(hObject, eventdata, Handles)
0473 % hObject    handle to Initialize_Tau_Type (see GCBO)
0474 % eventdata  reserved - to be defined in a future version of MATLAB
0475 % Handles    empty - Handles not created until after all CreateFcns called
0476 
0477 % Hint: edit controls usually have a white background on Windows.
0478 %       See ISPC and COMPUTER.
0479 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0480     set(hObject,'BackgroundColor','white');
0481 end
0482 
0483 
0484 
0485 function Initialize_Weight_Type_Callback(hObject, eventdata, Handles)
0486 % hObject    handle to Initialize_Weight_Type (see GCBO)
0487 % eventdata  reserved - to be defined in a future version of MATLAB
0488 % Handles    structure with Handles and user data (see GUIDATA)
0489 
0490 % Hints: get(hObject,'String') returns contents of Initialize_Weight_Type as text
0491 %        str2double(get(hObject,'String')) returns contents of Initialize_Weight_Type as a double
0492 
0493 
0494 % --- Executes during object creation, after setting all properties.
0495 function Initialize_Weight_Type_CreateFcn(hObject, eventdata, Handles)
0496 % hObject    handle to Initialize_Weight_Type (see GCBO)
0497 % eventdata  reserved - to be defined in a future version of MATLAB
0498 % Handles    empty - Handles not created until after all CreateFcns called
0499 
0500 % Hint: edit controls usually have a white background on Windows.
0501 %       See ISPC and COMPUTER.
0502 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0503     set(hObject,'BackgroundColor','white');
0504 end
0505 
0506 
0507 
0508 
0509 
0510 function Output_Inot_Callback(hObject, eventdata, Handles)
0511 % hObject    handle to Output_Inot (see GCBO)
0512 % eventdata  reserved - to be defined in a future version of MATLAB
0513 % Handles    structure with Handles and user data (see GUIDATA)
0514 
0515 % Hints: get(hObject,'String') returns contents of Output_Inot as text
0516 %        str2double(get(hObject,'String')) returns contents of Output_Inot as a double
0517 
0518 
0519 % --- Executes during object creation, after setting all properties.
0520 function Output_Inot_CreateFcn(hObject, eventdata, Handles)
0521 % hObject    handle to Output_Inot (see GCBO)
0522 % eventdata  reserved - to be defined in a future version of MATLAB
0523 % Handles    empty - Handles not created until after all CreateFcns called
0524 
0525 % Hint: edit controls usually have a white background on Windows.
0526 %       See ISPC and COMPUTER.
0527 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0528     set(hObject,'BackgroundColor','white');
0529 end
0530 
0531 function Hidden_Inot_Callback(hObject, eventdata, Handles)
0532 % hObject    handle to Hidden_Inot (see GCBO)
0533 % eventdata  reserved - to be defined in a future version of MATLAB
0534 % Handles    structure with Handles and user data (see GUIDATA)
0535 
0536 % Hints: get(hObject,'String') returns contents of Hidden_Inot as text
0537 %        str2double(get(hObject,'String')) returns contents of Hidden_Inot as a double
0538 
0539 
0540 % --- Executes during object creation, after setting all properties.
0541 function Hidden_Inot_CreateFcn(hObject, eventdata, Handles)
0542 % hObject    handle to Hidden_Inot (see GCBO)
0543 % eventdata  reserved - to be defined in a future version of MATLAB
0544 % Handles    empty - Handles not created until after all CreateFcns called
0545 
0546 % Hint: edit controls usually have a white background on Windows.
0547 %       See ISPC and COMPUTER.
0548 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0549     set(hObject,'BackgroundColor','white');
0550 end
0551 
0552 
0553 
0554 % --- Executes on button press in Delay_Enable.
0555 function Delay_Enable_Callback(hObject, eventdata, Handles)
0556 % hObject    handle to Delay_Enable (see GCBO)
0557 % eventdata  reserved - to be defined in a future version of MATLAB
0558 % Handles    structure with Handles and user data (see GUIDATA)
0559 
0560 % Hint: get(hObject,'Value') returns toggle state of Delay_Enable
0561 
0562 
0563 
0564 
0565 % --- Executes on selection change in Data_Type.
0566 function Data_Type_Callback(hObject, eventdata, Handles)
0567 % hObject    handle to Data_Type (see GCBO)
0568 % eventdata  reserved - to be defined in a future version of MATLAB
0569 % Handles    structure with Handles and user data (see GUIDATA)
0570 
0571 % Hints: contents = get(hObject,'String') returns Data_Type contents as cell array
0572 %        contents{get(hObject,'Value')} returns selected item from Data_Type
0573 
0574 
0575 % --- Executes during object creation, after setting all properties.
0576 function Data_Type_CreateFcn(hObject, eventdata, Handles)
0577 % hObject    handle to Data_Type (see GCBO)
0578 % eventdata  reserved - to be defined in a future version of MATLAB
0579 % Handles    empty - Handles not created until after all CreateFcns called
0580 
0581 % Hint: popupmenu controls usually have a white background on Windows.
0582 %       See ISPC and COMPUTER.
0583 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0584     set(hObject,'BackgroundColor','white');
0585 end
0586 
0587 
0588 
0589 
0590 
0591 function Max_Epochs_Callback(hObject, eventdata, Handles)
0592 % hObject    handle to Max_Epochs (see GCBO)
0593 % eventdata  reserved - to be defined in a future version of MATLAB
0594 % Handles    structure with Handles and user data (see GUIDATA)
0595 
0596 % Hints: get(hObject,'String') returns contents of Max_Epochs as text
0597 %        str2double(get(hObject,'String')) returns contents of Max_Epochs as a double
0598 
0599 
0600 % --- Executes during object creation, after setting all properties.
0601 function Max_Epochs_CreateFcn(hObject, eventdata, Handles)
0602 % hObject    handle to Max_Epochs (see GCBO)
0603 % eventdata  reserved - to be defined in a future version of MATLAB
0604 % Handles    empty - Handles not created until after all CreateFcns called
0605 
0606 % Hint: edit controls usually have a white background on Windows.
0607 %       See ISPC and COMPUTER.
0608 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0609     set(hObject,'BackgroundColor','white');
0610 end
0611 
0612 
0613 
0614 
0615 
0616 function Max_Error_Callback(hObject, eventdata, Handles)
0617 % hObject    handle to Max_Error (see GCBO)
0618 % eventdata  reserved - to be defined in a future version of MATLAB
0619 % Handles    structure with Handles and user data (see GUIDATA)
0620 
0621 % Hints: get(hObject,'String') returns contents of Max_Error as text
0622 %        str2double(get(hObject,'String')) returns contents of Max_Error as a double
0623 
0624 
0625 % --- Executes during object creation, after setting all properties.
0626 function Max_Error_CreateFcn(hObject, eventdata, Handles)
0627 % hObject    handle to Max_Error (see GCBO)
0628 % eventdata  reserved - to be defined in a future version of MATLAB
0629 % Handles    empty - Handles not created until after all CreateFcns called
0630 
0631 % Hint: edit controls usually have a white background on Windows.
0632 %       See ISPC and COMPUTER.
0633 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0634     set(hObject,'BackgroundColor','white');
0635 end
0636 
0637 
0638 
0639 
0640 
0641 function Tau_Learning_Rate_Callback(hObject, eventdata, Handles)
0642 % hObject    handle to Tau_Learning_Rate (see GCBO)
0643 % eventdata  reserved - to be defined in a future version of MATLAB
0644 % Handles    structure with Handles and user data (see GUIDATA)
0645 
0646 % Hints: get(hObject,'String') returns contents of Tau_Learning_Rate as text
0647 %        str2double(get(hObject,'String')) returns contents of Tau_Learning_Rate as a double
0648 
0649 
0650 % --- Executes during object creation, after setting all properties.
0651 function Tau_Learning_Rate_CreateFcn(hObject, eventdata, Handles)
0652 % hObject    handle to Tau_Learning_Rate (see GCBO)
0653 % eventdata  reserved - to be defined in a future version of MATLAB
0654 % Handles    empty - Handles not created until after all CreateFcns called
0655 
0656 % Hint: edit controls usually have a white background on Windows.
0657 %       See ISPC and COMPUTER.
0658 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0659     set(hObject,'BackgroundColor','white');
0660 end
0661 
0662 
0663 
0664 
0665 
0666 function Display_Frequency_Callback(hObject, eventdata, Handles)
0667 % hObject    handle to Display_Frequency (see GCBO)
0668 % eventdata  reserved - to be defined in a future version of MATLAB
0669 % Handles    structure with Handles and user data (see GUIDATA)
0670 
0671 % Hints: get(hObject,'String') returns contents of Display_Frequency as text
0672 %        str2double(get(hObject,'String')) returns contents of Display_Frequency as a double
0673 
0674 
0675 % --- Executes during object creation, after setting all properties.
0676 function Display_Frequency_CreateFcn(hObject, eventdata, Handles)
0677 % hObject    handle to Display_Frequency (see GCBO)
0678 % eventdata  reserved - to be defined in a future version of MATLAB
0679 % Handles    empty - Handles not created until after all CreateFcns called
0680 
0681 % Hint: edit controls usually have a white background on Windows.
0682 %       See ISPC and COMPUTER.
0683 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0684     set(hObject,'BackgroundColor','white');
0685 end
0686 
0687 
0688 
0689 % --- Executes during object creation, after setting all properties.
0690 function Regression_CreateFcn(hObject, eventdata, Handles)
0691 % hObject    handle to Regression (see GCBO)
0692 % eventdata  reserved - to be defined in a future version of MATLAB
0693 % Handles    empty - Handles not created until after all CreateFcns called
0694 
0695 % Hint: popupmenu controls usually have a white background on Windows.
0696 %       See ISPC and COMPUTER.
0697 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0698     set(hObject,'BackgroundColor','white');
0699 end
0700 
0701 C=filesep;
0702 d=dir(['Datasets',C,'Regression',C,'*.mat']);
0703 temp{1}='None';
0704 for j=1:length(d)
0705     temp{j+1}=d(j).name(1:(end-4));
0706 end
0707 temp{end+1}='Add Function...';
0708 set(hObject,'String',temp);
0709 
0710 % --- Executes on button press in Regression.
0711 function Regression_Callback(hObject, eventdata, Handles)
0712 % hObject    handle to Regression (see GCBO)
0713 % eventdata  reserved - to be defined in a future version of MATLAB
0714 % Handles    structure with Handles and user data (see GUIDATA)
0715 
0716 C=filesep;
0717 set(Handles.Classification,'Value',1);
0718 set(Handles.Spike_Times,'Value',1);
0719 temp=get(Handles.Regression,'String');
0720 set(Handles.Training_Data,'UserData','Regression');
0721 set(Handles.axes3,'UserData',{});
0722 status=set_io_data(Handles,[pwd, C, 'Datasets', C, 'Regression', C, temp{get(Handles.Regression,'Value')}],...
0723     temp{get(Handles.Regression,'Value')});
0724 
0725 
0726 % --- Executes during object creation, after setting all properties.
0727 function Classification_CreateFcn(hObject, eventdata, Handles)
0728 % hObject    handle to Classification (see GCBO)
0729 % eventdata  reserved - to be defined in a future version of MATLAB
0730 % Handles    empty - Handles not created until after all CreateFcns called
0731 
0732 % Hint: popupmenu controls usually have a white background on Windows.
0733 %       See ISPC and COMPUTER.
0734 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0735     set(hObject,'BackgroundColor','white');
0736 end
0737 
0738 C=filesep;
0739 d=dir(['Datasets',C,'Classification',C,'*.mat']);
0740 temp{1}='None';
0741 for j=1:length(d)
0742     temp{j+1}=d(j).name(1:(end-4));
0743 end
0744 temp{end+1}='Add Classifier...';
0745 set(hObject,'String',temp);
0746 
0747 % --- Executes on button press in Classification.
0748 function Classification_Callback(hObject, eventdata, Handles)
0749 % hObject    handle to Classification (see GCBO)
0750 % eventdata  reserved - to be defined in a future version of MATLAB
0751 % Handles    structure with Handles and user data (see GUIDATA)
0752 % --- Executes during object creation, after setting all properties.
0753 
0754 C=filesep;
0755 set(Handles.Regression,'Value',1);
0756 set(Handles.Spike_Times,'Value',1);
0757 temp=get(Handles.Classification,'String');
0758 set(Handles.Training_Data,'UserData','Classification');
0759 set(Handles.axes3,'UserData',{});
0760 status=set_io_data(Handles,[pwd, C, 'Datasets',C,'Classification',C, temp{get(Handles.Classification,'Value')}],...
0761     temp{get(Handles.Classification,'Value')});
0762 
0763 % --- Executes during object creation, after setting all properties.
0764 function Spike_Times_CreateFcn(hObject, eventdata, Handles)
0765 % hObject    handle to Spike_Times (see GCBO)
0766 % eventdata  reserved - to be defined in a future version of MATLAB
0767 % Handles    empty - Handles not created until after all CreateFcns called
0768 
0769 % Hint: popupmenu controls usually have a white background on Windows.
0770 %       See ISPC and COMPUTER.
0771 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0772     set(hObject,'BackgroundColor','white');
0773 end
0774 
0775 C=filesep;
0776 d=dir(['Datasets',C,'SpikeTimes',C,'*.mat']);
0777 temp{1}='None';
0778 for j=1:length(d)
0779     temp{j+1}=d(j).name(1:(end-4));
0780 end
0781 temp{end+1}='Add SpikeTimes...';
0782 set(hObject,'String',temp);
0783 
0784 % --- Executes on button press in Spike_Times.
0785 function Spike_Times_Callback(hObject, eventdata, Handles)
0786 % hObject    handle to Spike_Times (see GCBO)
0787 % eventdata  reserved - to be defined in a future version of MATLAB
0788 % Handles    structure with Handles and user data (see GUIDATA)
0789 
0790 C=filesep;
0791 set(Handles.Classification,'Value',1);
0792 set(Handles.Regression,'Value',1);
0793 temp=get(Handles.Spike_Times,'String');
0794 set(Handles.Training_Data,'UserData','SpikeTimes');
0795 set(Handles.axes3,'UserData',{});
0796 status=set_io_data(Handles,[pwd, C,'Datasets',C,'SpikeTimes',C, temp{get(Handles.Spike_Times,'Value')}],...
0797     temp{get(Handles.Spike_Times,'Value')});
0798 
0799 
0800 
0801 function Testing_Frequency_Callback(hObject, eventdata, Handles)
0802 % hObject    handle to Testing_Frequency (see GCBO)
0803 % eventdata  reserved - to be defined in a future version of MATLAB
0804 % Handles    structure with Handles and user data (see GUIDATA)
0805 
0806 % Hints: get(hObject,'String') returns contents of Testing_Frequency as text
0807 %        str2double(get(hObject,'String')) returns contents of Testing_Frequency as a double
0808 
0809 
0810 % --- Executes during object creation, after setting all properties.
0811 function Testing_Frequency_CreateFcn(hObject, eventdata, Handles)
0812 % hObject    handle to Testing_Frequency (see GCBO)
0813 % eventdata  reserved - to be defined in a future version of MATLAB
0814 % Handles    empty - Handles not created until after all CreateFcns called
0815 
0816 % Hint: edit controls usually have a white background on Windows.
0817 %       See ISPC and COMPUTER.
0818 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0819     set(hObject,'BackgroundColor','white');
0820 end
0821 
0822 
0823 
0824 
0825 % --- Executes on slider movement.
0826 function Zoom_Window_Callback(hObject, eventdata, Handles)
0827 % hObject    handle to Zoom_Window (see GCBO)
0828 % eventdata  reserved - to be defined in a future version of MATLAB
0829 % Handles    structure with Handles and user data (see GUIDATA)
0830 
0831 % Hints: get(hObject,'Value') returns position of slider
0832 %        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
0833 
0834 set(Handles.text34,'String',['Zoom Window: ',num2str(floor(get(Handles.Zoom_Window,'Value')))]);
0835 TrainingParams=get_training_params(Handles);
0836 plot_rmse(TrainingParams); %Will use saved data from last display to updata zoom on plot
0837 
0838 
0839 % --- Executes during object creation, after setting all properties.
0840 function Zoom_Window_CreateFcn(hObject, eventdata, Handles)
0841 % hObject    handle to Zoom_Window (see GCBO)
0842 % eventdata  reserved - to be defined in a future version of MATLAB
0843 % Handles    empty - Handles not created until after all CreateFcns called
0844 
0845 % Hint: slider controls usually have a light gray background.
0846 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0847     set(hObject,'BackgroundColor',[.9 .9 .9]);
0848 end
0849 
0850 
0851 
0852 % --------------------------------------------------------------------
0853 function Help_Callback(hObject, eventdata, Handles)
0854 % hObject    handle to Help (see GCBO)
0855 % eventdata  reserved - to be defined in a future version of MATLAB
0856 % Handles    structure with Handles and user data (see GUIDATA)
0857 
0858 % --------------------------------------------------------------------
0859 function ContextTest_Callback(hObject, eventdata, Handles)
0860 % hObject    handle to ContextTest (see GCBO)
0861 % eventdata  reserved - to be defined in a future version of MATLAB
0862 % Handles    structure with Handles and user data (see GUIDATA)
0863 
0864 
0865 % --------------------------------------------------------------------
0866 function About_Callback(hObject, eventdata, Handles)
0867 % hObject    handle to About (see GCBO)
0868 % eventdata  reserved - to be defined in a future version of MATLAB
0869 % Handles    structure with Handles and user data (see GUIDATA)
0870 
0871 Data=get(Handles.figure1,'UserData');
0872 Revision=Data{1};
0873 h=helpdlg(sprintf(['Theta Neuron Network Trainer (TNNT) Release ', Revision,'\nCopyright (c) 2007 Sam McKennoch\nAll Rights Reserved']),'About TNNT');
0874 set(h,'WindowStyle','modal');
0875 
0876 % --------------------------------------------------------------------
0877 function Documentation_Callback(hObject, eventdata, Handles)
0878 % hObject    handle to Documentation (see GCBO)
0879 % eventdata  reserved - to be defined in a future version of MATLAB
0880 % Handles    structure with Handles and user data (see GUIDATA)
0881 
0882 C=filesep;
0883 try
0884     open(['Help' C 'index.html']);
0885 catch
0886     h=errordlg(sprintf('Error displaying help documentation!\nPlease make sure that a Web browser and Adobe Acrobat Reader are installed correctly.'),'Documentation Error');
0887     set(h,'WindowStyle','modal');
0888 end
0889 
0890 
0891 
0892 % --- Executes during object creation, after setting all properties.
0893 function Randomize_Inot_CreateFcn(hObject, eventdata, Handles)
0894 % hObject    handle to Randomize_Inot (see GCBO)
0895 % eventdata  reserved - to be defined in a future version of MATLAB
0896 % Handles    empty - Handles not created until after all CreateFcns called
0897 
0898 % Hint: edit controls usually have a white background on Windows.
0899 %       See ISPC and COMPUTER.
0900 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0901     set(hObject,'BackgroundColor','white');
0902 end
0903 
0904 
0905 % --- Executes on button press in Randomize_Inot.
0906 function Randomize_Inot_Callback(hObject, eventdata, Handles)
0907 % hObject    handle to Randomize_Inot (see GCBO)
0908 % eventdata  reserved - to be defined in a future version of MATLAB
0909 % Handles    structure with Handles and user data (see GUIDATA)
0910 
0911 % Hint: get(hObject,'Value') returns toggle state of Randomize_Inot
0912 
0913 
0914 % --- Executes during object creation, after setting all properties.
0915 function Average_CreateFcn(hObject, eventdata, Handles)
0916 % hObject    handle to Average (see GCBO)
0917 % eventdata  reserved - to be defined in a future version of MATLAB
0918 % Handles    empty - Handles not created until after all CreateFcns called
0919 
0920 % Hint: edit controls usually have a white background on Windows.
0921 %       See ISPC and COMPUTER.
0922 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0923     set(hObject,'BackgroundColor','white');
0924 end
0925 
0926 % --- Executes on button press in Average.
0927 function Average_Callback(hObject, eventdata, Handles)
0928 % hObject    handle to Average (see GCBO)
0929 % eventdata  reserved - to be defined in a future version of MATLAB
0930 % Handles    structure with Handles and user data (see GUIDATA)
0931 
0932 % Hint: get(hObject,'Value') returns toggle state of Average
0933 
0934 TrainingParams=get_training_params(Handles);
0935 plot_rmse(TrainingParams);
0936 
0937 
0938 % --------------------------------------------------------------------
0939 function Tools_Callback(hObject, eventdata, Handles)
0940 % hObject    handle to Tools (see GCBO)
0941 % eventdata  reserved - to be defined in a future version of MATLAB
0942 % Handles    structure with Handles and user data (see GUIDATA)
0943 
0944 
0945 % --------------------------------------------------------------------
0946 function Gradient_Tester_Callback(hObject, eventdata, Handles)
0947 % hObject    handle to Gradient_Tester (see GCBO)
0948 % eventdata  reserved - to be defined in a future version of MATLAB
0949 % Handles    structure with Handles and user data (see GUIDATA)
0950 
0951 gradient_tester;
0952 
0953 
0954 function Averaging_Window_Callback(hObject, eventdata, Handles)
0955 % hObject    handle to Averaging_Window (see GCBO)
0956 % eventdata  reserved - to be defined in a future version of MATLAB
0957 % Handles    structure with Handles and user data (see GUIDATA)
0958 
0959 % Hints: get(hObject,'String') returns contents of Averaging_Window as text
0960 %        str2double(get(hObject,'String')) returns contents of Averaging_Window as a double
0961 
0962 TrainingParams=get_training_params(Handles);
0963 plot_rmse(TrainingParams);
0964 
0965 
0966 % --- Executes during object creation, after setting all properties.
0967 function Averaging_Window_CreateFcn(hObject, eventdata, Handles)
0968 % hObject    handle to Averaging_Window (see GCBO)
0969 % eventdata  reserved - to be defined in a future version of MATLAB
0970 % Handles    empty - Handles not created until after all CreateFcns called
0971 
0972 % Hint: edit controls usually have a white background on Windows.
0973 %       See ISPC and COMPUTER.
0974 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
0975     set(hObject,'BackgroundColor','white');
0976 end
0977 
0978 
0979 
0980 % --- Executes on button press in Initialize_Weight_Sign.
0981 function Initialize_Weight_Sign_Callback(hObject, eventdata, Handles)
0982 % hObject    handle to Initialize_Weight_Sign (see GCBO)
0983 % eventdata  reserved - to be defined in a future version of MATLAB
0984 % Handles    structure with Handles and user data (see GUIDATA)
0985 
0986 % Hint: get(hObject,'Value') returns toggle state of Initialize_Weight_Sign
0987 
0988 
0989 
0990 
0991 % --- Executes on button press in NIPS2006_Gradient.
0992 function NIPS2006_Gradient_Callback(hObject, eventdata, Handles)
0993 % hObject    handle to NIPS2006_Gradient (see GCBO)
0994 % eventdata  reserved - to be defined in a future version of MATLAB
0995 % Handles    structure with Handles and user data (see GUIDATA)
0996 
0997 % Hint: get(hObject,'Value') returns toggle state of NIPS2006_Gradient
0998 
0999 
1000 % --- Executes on button press in Numerical_Gradient.
1001 function Numerical_Gradient_Callback(hObject, eventdata, Handles)
1002 % hObject    handle to Numerical_Gradient (see GCBO)
1003 % eventdata  reserved - to be defined in a future version of MATLAB
1004 % Handles    structure with Handles and user data (see GUIDATA)
1005 
1006 % Hint: get(hObject,'Value') returns toggle state of Numerical_Gradient
1007 
1008 
1009 % --- Executes on button press in Weight_Perturb.
1010 function Weight_Perturb_Callback(hObject, eventdata, Handles)
1011 % hObject    handle to Weight_Perturb (see GCBO)
1012 % eventdata  reserved - to be defined in a future version of MATLAB
1013 % Handles    structure with Handles and user data (see GUIDATA)
1014 
1015 global Flags;
1016 Flags.PerturbFlag=1;
1017 
1018 
1019 function Weight_Perturb_Percent_Callback(hObject, eventdata, Handles)
1020 % hObject    handle to Weight_Perturb_Percent (see GCBO)
1021 % eventdata  reserved - to be defined in a future version of MATLAB
1022 % Handles    structure with Handles and user data (see GUIDATA)
1023 
1024 % Hints: get(hObject,'String') returns contents of Weight_Perturb_Percent as text
1025 %        str2double(get(hObject,'String')) returns contents of Weight_Perturb_Percent as a double
1026 
1027 
1028 % --- Executes during object creation, after setting all properties.
1029 function Weight_Perturb_Percent_CreateFcn(hObject, eventdata, Handles)
1030 % hObject    handle to Weight_Perturb_Percent (see GCBO)
1031 % eventdata  reserved - to be defined in a future version of MATLAB
1032 % Handles    empty - Handles not created until after all CreateFcns called
1033 
1034 % Hint: edit controls usually have a white background on Windows.
1035 %       See ISPC and COMPUTER.
1036 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1037     set(hObject,'BackgroundColor','white');
1038 end
1039 
1040 
1041 % --- Executes on selection change in AvailablePlots.
1042 function AvailablePlots_Callback(hObject, eventdata, Handles)
1043 % hObject    handle to AvailablePlots (see GCBO)
1044 % eventdata  reserved - to be defined in a future version of MATLAB
1045 % Handles    structure with Handles and user data (see GUIDATA)
1046 
1047 % Hints: contents = get(hObject,'String') returns AvailablePlots contents as cell array
1048 %        contents{get(hObject,'Value')} returns selected item from AvailablePlots
1049 
1050 
1051 % --- Executes during object creation, after setting all properties.
1052 function AvailablePlots_CreateFcn(hObject, eventdata, Handles)
1053 % hObject    handle to AvailablePlots (see GCBO)
1054 % eventdata  reserved - to be defined in a future version of MATLAB
1055 % Handles    empty - Handles not created until after all CreateFcns called
1056 
1057 % Hint: popupmenu controls usually have a white background on Windows.
1058 %       See ISPC and COMPUTER.
1059 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
1060     set(hObject,'BackgroundColor','white');
1061 end
1062 
1063

Generated on Wed 02-Apr-2008 15:16:32 by m2html © 2003