BAB V. KESIMPULAN DAN SARAN
B. Saran
1. Program bisa dikembangkan lagi dengan metode pembelajaran yang lain yang lebih baik lagi
Daftar Pustaka
Andam Zainal, 2002, Aplikasi Neural Network pada Pengenalan Pola Tanda Tangan, http://lecturer.eepis-its.edu/~huda/tandatangan.pdf
Fausett, L., 1994, Fundamentals of Neural Network, Architecture, Algorithms and Applications, Prentice Hall.
Kristanto, Andi, 2004, Jaringan Syaraf Tiruan, Gava Media, Yogyakarta KusumaDewi, Sri, Artificial Intelligence, Graha Ilmu, Yogyakarta
Munir, Rinaldi, Pengolahan citra digital dengan pendekatan algoritmik, Informatika, Bandung
Siang, J.J., 2005, Jaringan Syaraf Tiruan dan Pemrogramannya dengan MATLAB, Andi Offset, Yogyakarta.
% DATA_BARU, by itself, creates a new DATA_BARU or raises the existing % singleton*.
%
% H = DATA_BARU returns the handle to a new DATA_BARU or the handle to % the existing singleton*.
%
% DATA_BARU('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in DATA_BARU.M with the given input arguments. %
% DATA_BARU('Property','Value',...) creates a new DATA_BARU or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before data_baru_OpeningFunction gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to data_baru_OpeningFcn via varargin. %
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help data_baru % Last Modified by GUIDE v2.5 24-Mar-2007 14:21:00
% Begin initialization code - DO NOT EDIT gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @data_baru_OpeningFcn, ... 'gui_OutputFcn', @data_baru_OutputFcn, ... 'gui_LayoutFcn', [] , ...
'gui_Callback', []); if nargin & isstr(varargin{1})
gui_State.gui_Callback = str2func(varargin{1}); end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else
gui_mainfcn(gui_State, varargin{:}); end
% End initialization code - DO NOT EDIT
% --- Executes just before data_baru is made visible.
function data_baru_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to data_baru (see VARARGIN) % Choose default command line output for data_baru
str = datestr(now);
set(handles.text9,'string',str)
% --- Outputs from this function are returned to the command line. function varargout = data_baru_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure varargout{1} = handles.output;
% --- Executes during object creation, after setting all properties. function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit1_Callback(hObject, eventdata, handles) % hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit1 as text
% str2double(get(hObject,'String')) returns contents of edit1 as a double nma=get(handles.edit1,'string');
% pengecekan data untuk nama if (isletter(nma)==0)
errordlg('Nama harus berupa string','!! Perhatian !!') break;
end;
nm=isempty(nma); try
if (nm==1)
errordlg('Nama anda belum dimasukkan','!! Perhatian !!') end;
end
% --- Executes during object creation, after setting all properties. function edit2_CreateFcn(hObject, eventdata, handles)
% Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit2_Callback(hObject, eventdata, handles) % hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit2 as text
% str2double(get(hObject,'String')) returns contents of edit2 as a double almat=get(handles.edit2,'string');
% pengecekan data untuk alamat if (isletter(almat)==0)
errordlg('Alamat harus berupa string','!! Perhatian !!') break;
end;
almt=isempty(almat); try
if (almt==1)
errordlg('Alamat anda belum dimasukkan','!! Perhatian !!') end;
end
% --- Executes during object creation, after setting all properties. function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit3_Callback(hObject, eventdata, handles) % hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit3 as text % str2double(get(hObject,'String')) returns contents of edit3 as a double pkrjn=get(handles.edit3,'string');
% pengecekan data untuk pekerjaan if (isletter(pkrjn)==0)
if (pek==1)
errordlg('Pekerjaan anda belum dimasukkan','!! Perhatian !!') end;
end
% --- Executes during object creation, after setting all properties. function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit4_Callback(hObject, eventdata, handles) % hObject handle to edit4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit4 as text % str2double(get(hObject,'String')) returns contents of edit4 as a double notelp=get(handles.edit4,'string');
% pengecekan data untuk nomor telepon if (isletter(notelp)==1)
errordlg('Nomor telepon harus berupa angka','!! Perhatian !!') end;
notel=isempty(notelp); try
if (notel==1)
errordlg('Nomor telepon anda belum dimasukkan','!! Perhatian !!') end;
end
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) nma=get(handles.edit1,'string');
% pengecekan data untuk nama if (isletter(nma)==0)
errordlg('Nama harus berupa string','!! Perhatian !!') break;
end;
break; end;
almat=get(handles.edit2,'string'); % pengecekan data untuk alamat if (isletter(almat)==0)
errordlg('Alamat harus berupa string','!! Perhatian !!') break;
end;
almat = strvcat(almat) almt=isempty(almat); if (almt==1)
errordlg('Alamat anda belum dimasukkan','!! Perhatian !!') break;
end;
pkrjn=get(handles.edit3,'string'); % pengecekan data untuk pekerjaan if (isletter(pkrjn)==0)
errordlg('Pekerjaan harus berupa string','!! Perhatian !!') break;
end;
pkrjn = strvcat(pkrjn) pek=isempty(pkrjn); if (pek==1)
errordlg('Pekerjaan anda belum dimasukkan','!! Perhatian !!') break;
end;
notelp=get(handles.edit4,'string'); % pengecekan data untuk nomor telepon if isletter(notelp)==1
errordlg('Nomor telepon harus berupa angka','!! Perhatian !!') break;
end;
notelp = strvcat(notelp) notel=isempty(notelp); if (notel==1)
errordlg('Nomor telepon anda belum dimasukkan','!! Perhatian !!') break;
end;
gambar = get(handles.text13,'String')
% pengecekan data untuk gambar tanda tangan gambar = strvcat(gambar)
gbr = isempty(gambar); if(gbr == 1)
errordlg('gambar anda belum dimasukkan','!! Perhatian !!') break;
end
if gambar == 't001.jpg' | gambar == 't002.jpg'|gambar == 't003.jpg'|gambar == 't004.jpg'|gambar == 't005.jpg'|gambar == 't006.jpg'
errordlg('tanda tangan sudah ada','!! Perhatian !!') break;
break; end
if gambar == 't013.jpg' | gambar == 't014.jpg'|gambar == 't015.jpg'|gambar == 't016.jpg'|gambar == 't017.jpg'|gambar == 't018.jpg'
errordlg('tanda tangan sudah ada','!! Perhatian !!') break;
end
if gambar == 't019.jpg' | gambar == 't020.jpg'|gambar == 't021.jpg'|gambar == 't022.jpg'|gambar == 't023.jpg'|gambar == 't024.jpg'
errordlg('tanda tangan sudah ada','!! Perhatian !!') break;
end
if gambar == 't025.jpg' | gambar == 't026.jpg'|gambar == 't027.jpg'|gambar == 't028.jpg'|gambar == 't029.jpg'|gambar == 't030.jpg'
errordlg('tanda tangan sudah ada','!! Perhatian !!') break;
end
gambar_org = get(handles.text15,'String') % pengecekan data untuk gambar tanda tangan gambar2 = strvcat(gambar_org)
gbr = isempty(gambar2); if(gbr == 1)
errordlg('Foto anda belum dimasukkan','!! Perhatian !!') break;
end
% untuk menyimpan data
%untuk mengkoneksikan ke database myodbc conn = database('myodbc','root',''); ping(conn);
%untuk memilih tabel database
curs = exec(conn, 'select * from table_tanda_tangan') setdbprefs('DataReturnFormat','cellarray')
curs = fetch(curs,10) AA = curs.Data
%lihat_data=curs.data(:,1)
%untuk mengetahui jumlah data dari database yang disimpan panjangbaris = rows(curs)
data2 = { nma,almat,pkrjn,notelp,gambar,gambar2 } nama_data2 =
{'nama','alamat','pekerjaan','no_telp','gambar_pola','gambar_foto'} insert(conn, 'table_tanda_tangan', nama_data2, data2);
h = waitbar(0,'Proses Penyimpanan data'); for i=1:1000, % computation here %
waitbar(i/1000); end
close(h);
msgbox('Data Telah Tersimpan','Pesan Program','warn'); close(curs)
close(conn);
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close;
menu;
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles) % hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [fname,pname] =uigetfile({'*.jpg'},'Open Citra Tanda tangan'); asli=fname;
citra = imread(asli);
position = get(hObject, 'Position'); axes(handles.axes1);
imshow(citra);
set(handles.text13,'string',asli);
% --- Executes during object creation, after setting all properties. function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit5_Callback(hObject, eventdata, handles) % hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit5 as text
% str2double(get(hObject,'String')) returns contents of edit5 as a double % --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles) % hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [fname,pname] =uigetfile({'*.jpg'},'Open Citra Tanda tangan'); global asli
asli=fname;
citra = imread(asli);
position = get(hObject, 'Position'); axes(handles.axes4);
imshow(citra);
% COBA_TRAINING1, by itself, creates a new COBA_TRAINING1 or raises the existing % singleton*.
%
% H = COBA_TRAINING1 returns the handle to a new COBA_TRAINING1 or the handle to % the existing singleton*.
%
% COBA_TRAINING1('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in COBA_TRAINING1.M with the given input arguments. %
% COBA_TRAINING1('Property','Value',...) creates a new COBA_TRAINING1 or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before coba_training1_OpeningFunction gets called. An %unrecognized property name or invalid value makes property application % stop. All inputs are passed to coba_training1_OpeningFcn via varargin. %
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help coba_training1 % Last Modified by GUIDE v2.5 14-Mar-2007 13:06:27
% Begin initialization code - DO NOT EDIT gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @coba_training1_OpeningFcn, ... 'gui_OutputFcn', @coba_training1_OutputFcn, ... 'gui_LayoutFcn', [] , ...
'gui_Callback', []); if nargin & isstr(varargin{1})
gui_State.gui_Callback = str2func(varargin{1}); end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else
gui_mainfcn(gui_State, varargin{:}); end
% End initialization code - DO NOT EDIT
% --- Executes just before coba_training1 is made visible.
function coba_training1_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % varargin command line arguments to coba_training1 (see VARARGIN) % Choose default command line output for coba_training1
% UIWAIT makes coba_training1 wait for user response (see UIRESUME) % uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line. function varargout = coba_training1_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close;
menu;
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles) % hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) global hidden layar=str2num(hidden); if layar ==1 bobot; else bobot2hd; end
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles) % hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% ---training 2 data--- set(handles.pushbutton2,'enable','on') global ep global tol global lp global hd global edit_a global edit_b global unit2 global hd2 epoch=str2num(ep) tole=str2num(tol); laju=str2num(lp); unit=str2num(hd); unit2=str2num(hd2);
[m,n]=size(a); i=1; while i~=m for i=1:m if a(i,:)==1 a(i,:)=[]; m=m-1; i=1; break; end end end j=1; while j~=n for j=1:n if a(:,j)==1 a(:,j)=[]; n=n-1; j=1; break; end end end a1=imresize(a,[50 50]); end a21=double(a1); pa=a21(1:2500);
if edit_a == 't001.jpg' | edit_a == 't002.jpg'| edit_a == 't003.jpg' | edit_a == 't004.jpg'| edit_a == 't005.jpg'| edit_a == 't006.jpg'
t1=[1;0;0;0;0;]; else
if edit_a == 't007.jpg' | edit_a == 't008.jpg'| edit_a == 't009.jpg' | edit_a == 't010.jpg'| edit_a == 't011.jpg'| edit_a == 't012.jpg'
t1=[0;1;0;0;0]; else
if edit_a == 't013.jpg' | edit_a == 't014.jpg'| edit_a == 't015.jpg'| edit_a == 't016.jpg'| edit_a == 't017.jpg'| edit_a == 't018.jpg' t1=[0;0;1;0;0];
else
if edit_a == 't019.jpg' | edit_a == 't020.jpg'| edit_a == 't021.jpg'| edit_a == 't022.jpg'| edit_a == 't023.jpg'| edit_a == 't024.jpg' t1=[0;0;0;1;0];
else
if edit_a == 't025.jpg' | edit_a == 't026.jpg'| edit_a == 't027.jpg'| edit_a == 't028.jpg'| edit_a == 't029.jpg'| edit_a == 't030.jpg' t1=[0;0;0;0;1]; end end end end end
[m,n]=size(a); i=1; while i~=m for i=1:m if a(i,:)==1 a(i,:)=[]; m=m-1; i=1; break; end end end j=1; while j~=n for j=1:n if a(:,j)==1 a(:,j)=[]; n=n-1; j=1; break; end end end b1=imresize(a,[50 50]); end b21=double(b1); pb=b21(1:2500);
if edit_b == 't001.jpg' | edit_b == 't002.jpg'| edit_b == 't003.jpg'| edit_b == 't004.jpg'| edit_b == 't005.jpg'| edit_b == 't006.jpg' t2=[1;0;0;0;0;];
end
if edit_b == 't007.jpg' | edit_b == 't008.jpg'| edit_b == 't009.jpg'| edit_b == 't010.jpg'| edit_b == 't011.jpg'| edit_b == 't012.jpg' t2=[0;1;0;0;0];
end
if edit_b == 't013.jpg' | edit_b == 't014.jpg'| edit_b == 't015.jpg'| edit_b == 't016.jpg'| edit_b == 't017.jpg'| edit_b == 't018.jpg' t2=[0;0;1;0;0];
end
if edit_b == 't019.jpg' | edit_b == 't020.jpg'| edit_b == 't021.jpg'| edit_b == 't022.jpg'| edit_b == 't023.jpg'| edit_b == 't024.jpg' t2=[0;0;0;1;0];
end
if edit_b == 't025.jpg' | edit_b == 't026.jpg'| edit_b == 't027.jpg'| edit_b == 't028.jpg'| edit_b == 't029.jpg'| edit_b == 't030.jpg' t2=[0;0;0;0;1];
end
% ---cek string--- if (isequal(a1,b1)==1)
button = questdlg('Terdapat data yang sama.Apakah ingin diubah??',... 'Message Box','Ya','Tidak','Tidak');
if strcmp(button,'Ya') return;
% ---cek string--- p=[pa;pb]; pt=p'; global net; global t; t=[t1 t2] global hidden layar=str2num(hidden) if (layar==1) net=newff(minmax(pt),[unit,5],{'logsig','logsig'},'traingdx'); net=init(net); y=sim(net,pt) net.trainparam.epochs=epoch; net.trainparam.goal=tole; net.trainparam.lr=laju; tic [net,tr]=train(net,pt,t) toc global bobot1; global bobot2; global bobot3; global bobot4; global waktu; global eror global epoh bobot1=net.IW{1,1}; bobot2=net.LW{2,1}; bobot3=net.b{1}; bobot4=net.b{2}; waktu=toc eror=tr.perf(:,end) epoh=tr.epoch(:,end) e1=y-t rerata_e1=mean(abs(e1)) rerata_training=mean(abs(rerata_e1)) bobot; end if (layar==2) net=newff(minmax(pt),[unit,unit2,5],{'logsig','logsig','logsig'},'traingdx'); net=init(net) y=sim(net,pt) net.trainparam.epochs=epoch; net.trainparam.goal=tole; net.trainparam.lr=laju; tic [net,tr]=train(net,pt,t) toc global bobot1; global bobot2; global bobot3; global bobot4; global bobot5;
global epoh; bobot1=net.IW{1,1}; bobot2=net.LW{2,1}; bobot3=net.LW{3,2}; bobot4=net.b{1}; bobot5=net.b{2}; bobot6=net.b{3}; waktu=toc eror=tr.perf(:,end) epoh=tr.epoch(:,end) e1=y-t; rerata_e1=mean(abs(e1)); rerata_training=mean(abs(rerata_e1)) bobot2hd; end;
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles) % hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [fname,pname] =uigetfile('data training\*.jpg','Open Citra Tanda tangan'); asli=fname
set(handles.edit5,'string',asli);
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles) % hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [fname,pname] =uigetfile('data training\*.jpg','Open Citra Tanda tangan'); asli=fname;
set(handles.edit6,'string',asli);
% --- Executes during object creation, after setting all properties. function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit5_Callback(hObject, eventdata, handles) % hObject handle to edit5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit5 as text
% hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: edit controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
function edit6_Callback(hObject, eventdata, handles) % hObject handle to edit6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit6 as text % str2double(get(hObject,'String')) returns contents of edit6 as a double % --- Executes during object creation, after setting all properties. function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles) % hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
global ep
val_ep = get(hObject,'Value');
string_list = get(hObject,'String'); ep = string_list{val_ep};
% --- Executes during object creation, after setting all properties. function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu2 (see GCBO)
% See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
% --- Executes on selection change in popupmenu2.
function popupmenu2_Callback(hObject, eventdata, handles) % hObject handle to popupmenu2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu2 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu2
global tol
val_tol = get(hObject,'Value'); string_list = get(hObject,'String'); tol = string_list{val_tol};
% --- Executes during object creation, after setting all properties. function popupmenu3_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
% --- Executes on selection change in popupmenu3.
function popupmenu3_Callback(hObject, eventdata, handles) % hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu3 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu3
global lp
val_lp = get(hObject,'Value');
string_list = get(hObject,'String'); lp = string_list{val_lp};
% --- Executes during object creation, after setting all properties. function popupmenu4_CreateFcn(hObject, eventdata, handles)
% See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
% --- Executes on selection change in popupmenu4.
function popupmenu4_Callback(hObject, eventdata, handles) % hObject handle to popupmenu4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu4 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu4 global hd
val_hd = get(hObject,'Value');
string_list = get(hObject,'String'); hd = string_list{val_hd};
% --- Executes during object creation, after setting all properties. function popupmenu5_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles empty - handles not created until after all CreateFcns called % Hint: popupmenu controls usually have a white background on Windows. % See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white'); else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
% --- Executes on selection change in popupmenu5.
function popupmenu5_Callback(hObject, eventdata, handles) % hObject handle to popupmenu5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu5 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu5 global hd2
val_hd2 = get(hObject,'Value'); string_list = get(hObject,'String'); hd2 = string_list{val_hd2};
% --- Executes during object creation, after setting all properties. function popupmenu6_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu6 (see GCBO)
% See ISPC and COMPUTER. if ispc set(hObject,'BackgroundColor','white'); else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor')); end
% --- Executes on selection change in popupmenu6.
function popupmenu6_Callback(hObject, eventdata, handles) % hObject handle to popupmenu6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu6 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu6 global val_hidden global hidden val_hidden = get(hObject,'Value'); string_list = get(hObject,'String'); hidden = string_list{val_hidden}; if val_hidden==1 set(handles.popupmenu4,'visible','on') set(handles.popupmenu5,'visible','off') end if val_hidden==2 set(handles.popupmenu4,'visible','on') set(handles.popupmenu5,'visible','on') end
Form Testing (Testing30.m)
function varargout = testing30(varargin) % TESTING30 M-file for testing30.fig
% TESTING30, by itself, creates a new TESTING30 or raises the existing % singleton*.
%
% H = TESTING30 returns the handle to a new TESTING30 or the handle to % the existing singleton*.
%
% TESTING30('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in TESTING30.M with the given input arguments.
%
% TESTING30('Property','Value',...) creates a new TESTING30 or raises the
% existing singleton*. Starting from the left, property value pairs are % applied to the GUI before testing30_OpeningFunction gets called. An %unrecognized property name or invalid value makes property application %stop. All inputs are passed to testing30_OpeningFcn via varargin. %
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one