IF..THEN rules
이전 댓글 표시
Hi,
I want to create if..then rules using Matlab coding. I know that there is tool box for fuzzy, but I am trying to do it in a different way.
Suppose I have 3 membership functions (x1 and x2 are the inputs, and y is the output).
x = 0:0.01:1
x1 = gaussmf(x, [0.125 0.5]) %medium
x2 = gaussmf(x, [0.0625 0.125]) %low
y = gaussmf(x, [0.15 0.6]) %medium
Now I try to relate these membership functions based on this rule:
'If x1 is medium and x2 is low, then y is medium.'
Is there any code for this?
Thank you.
댓글 수: 6
KALYAN ACHARJYA
2019년 8월 26일
'If x1 is medium and x2 is low, then y is medium.'
Can you elaborate more with example?
muhammad muda
2019년 8월 26일
Adam Danz
2019년 8월 26일
What does it mean for x1 to be "medium" or "low"? Renaming the variables from x1 to welding speed doesn't help. Here are your data below. What would you like to do?

darova
2019년 8월 26일
Where is the edge between low and medium?

Adam Danz
2019년 8월 26일
If the red curve is the definition of "low" and the blue curves are definitions of "medium" then I would calculate where those curve intersect. If there are 2 "medium" curves, you could take the average of the 2 x values at the two intersections.
muhammad muda
2019년 8월 26일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!