Halaman Kami

Pengenalan Pola

Posted on Rabu, 25 Mei 2011 by ai-a-erial.blogspot.com | 0 komentar

membuat program untuk pengenalan pola


sebagai berikut :

%---------------------------------------------------

% PROGRAM JARINGAN SYARAF TIRUAN MENGENALI POLA SEGITIGA, SEGIEMPAT DAN LINGKARAN

% Oleh : AI-A-ERIAL
% Anggota :
% Eko susanto (0915031035)
% Robert lie n ( 0915031099)
% Imam baldi p ( 0915031089)
% Achmad taufik p (0915031077 )
% Leonardo simanullang ( 0715031053 )
%--------------------------------------------------


clear all;

clc;


disp('-------------------------------');

disp('Program JST 2 (multilayer)');

disp('-------------------------------');


w11 = input('masukkan nilai w11 = ');

w12 = input('masukkan nilai w12 = ');

w21 = input('masukkan nilai w21 = ');

w22 = input('masukkan nilai w22 = ');

v1 = input('masukkan nilai v1 = ');

v2 = input('masukkan nilai v2 = ');

b1 = input('masukkan nilai Treshoold pertama = ');

b2 = input('masukkan nilai Treshoold kedua= ');

b = input('masukkan nilai Treshoold ketiga= ');




x1=0;

x2=0;



n11=x1*w11+x2*w12-b1;


if n11 >= 0

a11 = 1;



elseif n11 < a11 =" 0;" x1="0;" x2="1;" n12="x1*w11+x2*w12-b1;">= 0

a12 = 1;



elseif n12 < a12 =" 0;" x1="1;" x2="0;" n13="x1*w11+x2*w12-b1;">= 0

a13 = 1;



elseif n13 < a13 =" 0;" x1="1;" x2="1;" n14="x1*w11+x2*w12-b1;">= 0

a14 = 1;



elseif n14 < a14 =" 0;" x1="0;" x2="0;" n21="x1*w21+x2*w22-b2;">= 0

a21 = 1;



elseif n21 < a21 =" 0;" x1="0;" x2="1;" n22="x1*w21+x2*w22-b2;">= 0

a22 = 1;



elseif n22 < a22 =" 0;" x1="1;" x2="0;" n23="x1*w21+x2*w22-b2;">= 0

a23 = 1;



elseif n23 < a23 =" 0;" x1="1;" x2="1;" n24="x1*w21+x2*w22-b2;">= 0

a24 = 1;



elseif n24 < a24 =" 0;" pilih ="input">');


switch pilih





case 1



x1=a11;

x2=a21;

y1=x1*v1+x2*v2-b;

disp(['iterasi 1, Nilai y1 = ' num2str(y1)]);

if y1 >= 0

disp('Fn = 1');

disp('error');

elseif y1 < fn =" 0');" x1="12;" x2="22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y2 < fn =" 0');" x1="13;" x2="23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y3 < fn =" 0');" x1="14;" x2="24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y1 < fn =" 0');" x1="a12;" x2="a22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y2 < fn =" 0');" x1="a13;" x2="a23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y3 < fn =" 0');" x1="a14;" x2="a24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y4 < fn =" 0');" x1="a11;" x2="a21;" y1="x1*v1+x2*v2-b;" y1 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y1 < fn =" 0');" x1="12;" x2="22;" y2="x1*v1+x2*v2-b;" y2 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y2 < fn =" 0');" x1="13;" x2="23;" y3="x1*v1+x2*v2-b;" y3 =" '">= 0

disp('Fn = 1');

disp('error');

elseif y3 < fn =" 0');" x1="14;" x2="24;" y4="x1*v1+x2*v2-b;" y4 =" '">= 0

disp('Fn = 1');

disp('benar ');

elseif y4 < 0

disp('Fn = 0');

disp('error');

end;



end;

0 komentar:

Posting Komentar