Lampiran 1 Data Testing Normal Jantung

  Lampiran 1 Data Testing Normal Jantung

  78

  Lampiran 2 Data Testing Ischemia Jantung

  Lampiran 3 Data Testing Abnormal Variasi Jantung

  Lampiran 4 Listing Rancangan Form Cover %--- Executes just before COVER is made visible.

  function COVER_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 COVER (see VARARGIN) set(imshow('C:\Users\M.TAUFIQ\Downloads\gambar anatomi\Picture1.jpg')); % Choose default command line output for COVER handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes COVER wait for user response (see UIRESUME) % uiwait(handles.figure1); % --- Outputs from this function are returned to the command line. function varargout = COVER_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;

  % -------------------------------------------------------------------- function Training_Callback(hObject, eventdata, handles) % hObject handle to Training (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) respon=USER('title','Training'); % -------------------------------------------------------------------- function Testing_Callback(hObject, eventdata, handles) % hObject handle to Testing (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) respon=ujicobắtitlé,'Testing');

  % -------------------------------------------------------------------- function Help_Callback(hObject, eventdata, handles) % hObject handle to Help (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function Ischemia_Callback(hObject, eventdata, handles) % hObject handle to Ischemia (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

  % -------------------------------------------------------------------- function Untitled_1_Callback(hObject, eventdata, handles) % hObject handle to Untitled_1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function Untitled_2_Callback(hObject, eventdata, handles) % hObject handle to Untitled_2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

  % -------------------------------------------------------------------- function Exit_Callback(hObject, eventdata, handles) % hObject handle to Exit (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close;

  Lampiran 5 Listing Rancangan Form Training

  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 % --- 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); 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 % --- 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end

  % ---------------------------------------------------------------- function File_Callback(hObject, eventdata, handles) % hObject handle to File (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % ---------------------------------------------------------------- function Proses_Callback(hObject, eventdata, handles) % hObject handle to Proses (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % ---------------------------------------------------------------- function Training_Callback(hObject, eventdata, handles) % hObject handle to Training (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) myform=guidata(gcbo); load 'C:\Users\M.TAUFIQ\Documents\MATLAB\DATABASE\UJI COBA 2\inputujicoba3'; P=z; n=str2double(get(myform.edit3,'String')); m=str2double(get(myform.edit4,'String')); load 'C:\Users\M.TAUFIQ\Documents\MATLAB\DATABASE\UJI COBA 2\targetcoba4'; T=a; net=newff(minmax(P),[n 1],{'logsig' 'purelin'},'traingda'); load 'C:\Users\M.TAUFIQ\Documents\MATLAB\DATABASE\UJI COBA 2\bobotfix3'; Bobot_awal_input_baru = Bobot_awal_input; Bobot_awal_bias_input_baru = Bobot_awal_bias_input; Bobot_awal_lapisan_baru = Bobot_awal_lapisan; Bobot_awal_bias_lapisan_baru = Bobot_awal_bias_lapisan; net. trainParam.epochs =m; net.trainParam.goal = 0.0001; net.trainParam.lr = 0.1; net.trainParam.show=100; net=train(net,P,T) Bobot_akhir_input_baru = net.IW{1,1}; Bobot_akhir_bias_input_baru = net.b{1}; Bobot_akhir_lapisan_baru = net.LW{2,1}; Bobot_akhir_bias_lapisan_baru = net.b{2};

  Y=sim(net,P); save inputNew7 net Y=round(Y); TT=T'; C=Y'; hasil=[TT C] tot=length(TT) jumlah=0; for hit=1:tot if(T(hit)==C(hit)) jumlah=jumlah+1; end end jumlah persenq=(jumlah/tot)*100 set(myform.uitable1,'data',Bobot_akhir_input_baru); set(myform.uitable5,'data',Bobot_akhir_bias_input_baru ); set(myform.uitable3,'data',Bobot_akhir_lapisan_baru); set(myform.uitable4,'data',Bobot_akhir_bias_lapisan_baru); set(myform.edit9,'string',persenq); % ---------------------------------------------------------------- function Browse_Callback(hObject, eventdata, handles) % hObject handle to Browse (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % ---------------------------------------------------------------- function Exit_Callback(hObject, eventdata, handles) % hObject handle to Exit (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close; function edit9_Callback(hObject, eventdata, handles) % hObject handle to edit9 (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 edit9 as text % str2double(get(hObject,'String')) returns contents of edit9 as a double % --- Executes during object creation, after setting all properties. function edit9_CreateFcn(hObject, eventdata, handles) % hObject handle to edit9 (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end

  Lampiran 6 Listing Rancangan Form Testing

  function enama_Callback(hObject, eventdata, handles) % hObject handle to enama (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 enama as text % str2double(get(hObject,'String')) returns contents of enama as a double % --- Executes during object creation, after setting all properties. function enama_CreateFcn(hObject, eventdata, handles) % hObject handle to enama (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end function etanggal_Callback(hObject, eventdata, handles) % hObject handle to etanggal (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 etanggal as text % str2double(get(hObject,'String')) returns contents of etanggal as a double % --- Executes during object creation, after setting all properties. function etanggal_CreateFcn(hObject, eventdata, handles) % hObject handle to etanggal (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end % -------------------------------------------------------------------- function File_Callback(hObject, eventdata, handles) % hObject handle to File (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function Untitled_2_Callback(hObject, eventdata, handles) % hObject handle to Untitled_2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function citra_Callback(hObject, eventdata, handles) % hObject handle to citra (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) proyek=guidata(gcbo); I=get(proyek.axes3,'userdata');

  II=rgb2gray(I) set(proyek.figure1,'CurrentAxes',proyek.asli); set(imshow(II)); gg=imadjust(II,[],[],0.7); set(proyek.figure1,'CurrentAxes',proyek.axes10); set(imshow(gg));

  [b k]=size(gg); T=35; for i=1:b for j=1:k if(gg(i,j)>T) hasil(i,j)=0; else hasil(i,j)=1; end end end set(proyek.figure1,'CurrentAxes',proyek.axes11); set(imshow(hasil));

  SE3=strel('square',3); bww1=imdilate(hasil,SE3) set(proyek.figure1,'CurrentAxes',proyek.axes12); set(imshow(bww1)); SEE=strel('square',2); bww=imerode(bww1,SEE); set(proyek.figure1,'CurrentAxes',proyek.axes13); set(imshow(bww)); % penentuan ordinat [m n]=size(bww) for j=1:n y(j)=0; end for i=1:m for j=1:n if (bww(i,j)==1) if (y(j)==0) y(j)=i; end end end end y %penentuan potensial yy=y-y(1) yy=-yy omaks=max(yy(:)); omin=min(yy(:)); xp=1:n; set(proyek.figure1,'CurrentAxes',proyek.axes14); set(plot(xp,yy)); axis([0 n omin-10 omaks+10]) save TEST yy; % -------------------------------------------------------------------- function Untitled_6_Callback(hObject, eventdata, handles) % hObject handle to File (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % -------------------------------------------------------------------- function Exit_Callback(hObject, eventdata, handles) % hObject handle to Exit (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) close;

  % -------------------------------------------------------------------- function Browse_Callback(hObject, eventdata, handles) % hObject handle to Browse (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) proyek=guidata(gcbo);

  [namafile,direktori]=uigetfile({'*.jpg';'*.bpm';... '*.png';'*.tif'},'Buka Gambar'); I=imread([direktori,namafile]); set(proyek.figure1,'CurrentAxes',proyek.axes3); set(imshow(I)); info=imfinfo([direktori,namafile]); set(proyek.enama,'String',info.Filename); set(proyek.etanggal,'String',info.FileModDate); set(proyek.axes3,'Userdata',I); % -------------------------------------------------------------------- function deteksi_Callback(hObject, eventdata, handles) % hObject handle to deteksi (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) proyek=guidata(gcbo); load 'C:\Users\M.TAUFIQ\Documents\MATLAB\DATABASE\UJI COBA 2\inputNew7' load TEST tes=yy'; Y=sim(net,tes); Y=round (Y); if Y==1 set(proyek.hasil,'string','Ischemic') else if Y==0 set(proyek.hasil,'string','Normal') else set(proyek.hasil,'string','Abnormal variasi') end end function hasil_Callback(hObject, eventdata, handles) % hObject handle to hasil (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 hasil as text % str2double(get(hObject,'String')) returns contents of hasil as a double

  % --- Executes during object creation, after setting all properties. function hasil_CreateFcn(hObject, eventdata, handles) % hObject handle to hasil (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) set(hObject,'BackgroundColor','white'); end