IRootLab
An Open-Source MATLAB toolbox for vibrational biospectroscopy
uip_clssr_svm.m
Go to the documentation of this file.
1 %> @ingroup guigroup
2 %> @file
3 %> @brief Properties Window for @ref clssr_svm
4 %>
5 %> @image html Screenshot-uip_clssr_svm.png
6 %>
7 %> @sa clssr_svm
8 
9 %> @cond
10 function varargout = uip_clssr_svm(varargin)
11 % Last Modified by GUIDE v2.5 04-Feb-2011 14:38:23
12 
13 % Begin initialization code - DO NOT EDIT
14 gui_Singleton = 1;
15 gui_State = struct('gui_Name', mfilename, ...
16  'gui_Singleton', gui_Singleton, ...
17  'gui_OpeningFcn', @uip_clssr_svm_OpeningFcn, ...
18  'gui_OutputFcn', @uip_clssr_svm_OutputFcn, ...
19  'gui_LayoutFcn', [] , ...
20  'gui_Callback', []);
21 if nargin && ischar(varargin{1})
22  gui_State.gui_Callback = str2func(varargin{1});
23 end
24 
25 if nargout
26  [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
27 else
28  gui_mainfcn(gui_State, varargin{:});
29 end
30 % End initialization code - DO NOT EDIT
31 
32 
33 % --- Executes just before uip_clssr_svm is made visible.
34 function uip_clssr_svm_OpeningFcn(hObject, eventdata, handles, varargin)
35 handles.output.flag_ok = 0;
36 guidata(hObject, handles);
37 gui_set_position(hObject);
38 
39 
40 % --- Outputs from this function are returned to the command line.
41 function varargout = uip_clssr_svm_OutputFcn(hObject, eventdata, handles)
42 try
43  uiwait(handles.figure1);
44  handles = guidata(hObject);
45  varargout{1} = handles.output;
46  delete(gcf);
47 catch
48  output.flag_ok = 0;
49  varargout{1} = output;
50 end;
51 
52 
53 
54 function editC_Callback(hObject, eventdata, handles)
55 % hObject handle to editC (see GCBO)
56 % eventdata reserved - to be defined in a future version of MATLAB
57 % handles structure with handles and user data (see GUIDATA)
58 
59 % Hints: get(hObject,'String') returns contents of editC as text
60 % str2double(get(hObject,'String')) returns contents of editC as a double
61 
62 
63 % --- Executes during object creation, after setting all properties.
64 function editC_CreateFcn(hObject, eventdata, handles)
65 % hObject handle to editC (see GCBO)
66 % eventdata reserved - to be defined in a future version of MATLAB
67 % handles empty - handles not created until after all CreateFcns called
68 
69 % Hint: edit controls usually have a white background on Windows.
70 % See ISPC and COMPUTER.
71 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
72  set(hObject,'BackgroundColor','white');
73 end
74 
75 
76 
77 % --- Executes on button press in pushbuttonCreate.
78 function pushbuttonCreate_Callback(hObject, eventdata, handles)
79 % hObject handle to pushbuttonCreate (see GCBO)
80 % eventdata reserved - to be defined in a future version of MATLAB
81 % handles structure with handles and user data (see GUIDATA)
82 try
83  handles.output.params = {...
84  'c', get(handles.editC, 'String'), ...
85  'gamma', get(handles.editGamma, 'String') ...
86  };
87  handles.output.flag_ok = 1;
88  guidata(hObject, handles);
89  uiresume();
90 catch ME
91  irerrordlg(ME.message, 'Cannot continue');
92 
93 end;
94 
95 
96 function editGamma_Callback(hObject, eventdata, handles)
97 % hObject handle to editGamma (see GCBO)
98 % eventdata reserved - to be defined in a future version of MATLAB
99 % handles structure with handles and user data (see GUIDATA)
100 
101 % Hints: get(hObject,'String') returns contents of editGamma as text
102 % str2double(get(hObject,'String')) returns contents of editGamma as a double
103 
104 
105 % --- Executes during object creation, after setting all properties.
106 function editGamma_CreateFcn(hObject, eventdata, handles)
107 % hObject handle to editGamma (see GCBO)
108 % eventdata reserved - to be defined in a future version of MATLAB
109 % handles empty - handles not created until after all CreateFcns called
110 
111 % Hint: edit controls usually have a white background on Windows.
112 % See ISPC and COMPUTER.
113 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
114  set(hObject,'BackgroundColor','white');
115 end
116 %>@endcond
function gui_set_position(in hObject)
Analysis Session (AS) base class.
Definition: as.m:6
function irerrordlg(in errorstring, in dlgname)
Support Vector Machine Classifier using LibSVM.
Definition: clssr_svm.m:23