Help me with rule code

조회 수: 8 (최근 30일)
geor
geor 2014년 6월 2일
편집: geor 2014년 6월 2일
Hello i have one problem i have one system with one input and one output the rule is IF x is A1 then y is PL AlSO IF x is A2 then y is PM ALSO IF x is A3 then y is ZE ALSO IF x is A4 then y is NM ALSO IF x is A5 then y is NL ALSO IF x is A6 then y is NM ALSO IF x is A7 then y is ZE ALSO IF x is A8 then y is PM ALSO IF x is A9 then y is PL
the code ///
x=linspace(0,360,361); y=linspace(-5,5,361); z=5*cos(2*pi*x/360);
[A,B,C]=tri_MF_partition(0,360,9,0.5); for i=1:9 x_mf(i,:)=tri_MF(x,A(i),B(i),C(i));// here i create the A1,A2,A3,A4,A5,A6,A7,A8,A9 end
[A,B,C]=tri_MF_partition(-5,5,5,g); for i=1:5
y_mf(i,:)=tri_MF(y,A(i),B(i),C(i));//here i create the PL,NM,ZE,NL,NM end
how make fuzzification COA? i know there is a matlab programma (fuzzy) but i want make that with matlab code thank you

채택된 답변

geor
geor 2014년 6월 2일
편집: geor 2014년 6월 2일
i must make that results.
I must use Mamdani and for also i must use max
and find w1,w2,w3..w9 and c1,c2,c3..c9 and ctotal=max(c1,c2,...c9)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by