Matlab Fuzzy Logic Toolbox - OR statement in one input
1 次查看(过去 30 天)
显示 更早的评论
Dear,
I have one question about rules in Matlab Fuzzy Toolbox. Is it possible to add OR statement in one input between Membership function in one rule?
Example:
[Input1]
Name='Age'
Range=[18 100]
NumMFs=3
MF1='young':'trapmf',[0 1 23 37]
MF2='middle_aged':'trapmf',[23 37 53 67]
MF3='old':'trapmf',[53 67 100 100]
[Output1]
Name='Primary_Headches_Types'
Range=[0 10]
NumMFs=3
MF1='Migraine':'trimf',[0 2 4]
MF2='TTH':'trimf',[2 4 6]
MF3='TACs':'trimf',[5 7 9]
[Rules]
1. If (Age is young or old) then (Primary_Headches_Types is Migraine) (1)
Or something like this:
[Rules]
1. If (Age is young) or (Age is old) then (Primary_Headches_Types is Migraine) (1)
P.S. This is just simple example, my issue is very complexed. I use Mamadani system.
How can I do something like this to scale the number of rules because I will have over 1200 of them.
Thanks so much for the answer in advance and have a nice weekend!
Best Regards,
Marko Štalmatović
0 个评论
回答(1 个)
Mohith Kulkarni
2020-11-25
The addrule function is supporting only one membership function for each input. Even if you add the rule with OR connectiion between membership function of the same input, the rule is being created with the antecedent property having only one of the specified membership function for the input.
As a workaround, two different rules, one for each membership function can be added in such cases.
I have brought this issue to the notice of our developers. They will investigate the matter further.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Fuzzy Logic in Simulink 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!