Professional Documents
Culture Documents
Ahmad Fajar Nugroho (12518241040)
Ahmad Fajar Nugroho (12518241040)
I.
Tujuan
Menentukan identitas dasar dalam fuzzy sets.
II.
% modul sqrmf.m
function [val] = sqrmf(x,a,b)
val = max(min(min((x-a)/0.001,(b-x)/0.001),1),0);
return;
Modul gbellmf :
% modul gbellmf.m
function [y] = gbellmf(x,a,b,c)
y = 1./(1+(((x-c)/a).^2).^b);
return;
subplot(223)
plot(x,A,'--',x,1-A,'-.',x,max(A,1-A),'r');
axis ([-inf inf 0 1.2]);
title('A Or (Not A)');
subplot(224)
plot(x,Az,'--',x,1-Az,'-.',x,max(Az,1-Az),'r');
axis ([-inf inf 0 1.2]);
title('A Or (Not A)');
hold off
hold on
subplot(221)
plot(x,A,'b',x,Az,'r');
axis([-inf inf 0 1.2]);
title('A');
set(gca ,'xtick', [0 200 400 600]);
subplot(222)
plot(x,min(A,A),'b',x,min(Az,Az),'r');
axis([-inf inf 0 1.2]);
title('A and A');
set(gca ,'xtick', [0 200 400 600]);
subplot(223)
plot(x,max(A,A),'b',x,max(Az,Az),'r');
axis([-inf inf 0 1.2]);
title('A or A');
set(gca ,'xtick', [0 200 400 600]);
subplot(224)
plot(x,1-(1-A),'b',x,1-(1-Az),'r');
axis([-inf inf 0 1.2]);
title('Not (Not A)');
set(gca ,'xtick', [0 200 400 600]);
hold off
subplot(223)
plot(x,max(A,B),'b',x,max(Az,Bz),'r');
axis([-inf inf 0 1.2]);
title('A or B');
set(gca ,'xtick', [0 200 400 600]);
subplot(224)
plot(x,max(B,A),'b',x,max(Bz,Az),'r');
axis([-inf inf 0 1.2]);
title('B or A');
set(gca ,'xtick', [0 200 400 600]);
hold off
hold on
subplot(221)
plot(x,min(min(A,B),C),'b',x,min(min(Az,Bz),Cz),'r');
axis([-inf inf 0 1.2]);
title('(A and B) and C');
set(gca ,'xtick', [0 200 400 600]);
subplot(222)
plot(x,min(A,min(B,C)),'b',x,min(Az,min(Bz,Cz)),'r');
axis([-inf inf 0 1.2]);
title('A and (B and C)');
set(gca ,'xtick', [0 200 400 600]);
subplot(223)
plot(x,max(max(A,B),C),'b',x,max(max(Az,Bz),Cz),'r');
axis([-inf inf 0 1.2]);
title('(A or B) or C');
set(gca ,'xtick', [0 200 400 600]);
subplot(224)
plot(x,max(A,max(B,C)),'b',x,max(Az,max(Bz,Cz)),'r');
axis([-inf inf 0 1.2]);
title('A or (B or C)');
set(gca ,'xtick', [0 200 400 600]);
hold off
subplot(223)
plot(x,A,'b',x,Az,'r');
axis([-inf inf 0 1.2]);
title('A');
set(gca, 'xtick', [ 0 200 400 600]);
subplot(224)
plot(x,min(A,max(A,B)),'b',x,min(Az,max(Az,Bz)),'r');
axis([-inf inf 0 1.2]);
title('A and (A or B)');
set(gca, 'xtick', [ 0 200 400 600]);
hold off
hold on
subplot(221)
plot(x,max(A,min((1-A),B)),'b',x,max(Az,min((1-Az),Bz)),'r');
axis([-inf inf 0 1.2]);
title('A or (Not A and B)');
set(gca, 'xtick', [ 0 200 400 600]);
subplot(222)
plot(x,max(A,B),'b',x,max(Az,Bz),'r');
axis([-inf inf 0 1.2]);
title('A or B');
set(gca, 'xtick', [ 0 200 400 600]);
subplot(223)
plot(x,min(A,max((1-A),B)),'b',x,min(Az,max((1-Az),Bz)),'r');
axis([-inf inf 0 1.2]);
title('A and (Not A or B)');
set(gca, 'xtick', [ 0 200 400 600]);
subplot(224)
plot(x,min(A,B),'b',x,min(Az,Bz),'r');
axis([-inf inf 0 1.2]);
title('A and B');
set(gca, 'xtick', [ 0 200 400 600]);
hold off
subplot(223)
plot(x,1-min(A,B),'b',x,1-min(Az,Bz),'r');
axis([-inf inf 0 1.2]);
title('Not (A and B)');
set(gca, 'xtick', [ 0 200 400 600]);
subplot(224)
plot(x,max(1-A,1-B),'b',x,max(1-Az,1-Bz),'r');
axis([-inf inf 0 1.2]);
title('(Not A) or (Not B)');
set(gca, 'xtick', [ 0 200 400 600]);
hold off
Kesimpulan
Dari hasil praktikum di atas, gambar 8, pada bagian 3 dan 4 tidak dapat
dipakai karena kurva yang dihasilan tidak sama, sedangkan pada sub
modul dan figur lainnya, masing-masing memiliki kesamaan pada