[討論]Fuzzy rule 模糊規則表示法請益
各位學長好:
近期在瞭解模糊控制的使用方法,目前遇到的問題是
我有找到兩個範例程式,其中在RuleList 的表示法,
我看不懂,也找過官方的說明網站(addrule),但好像沒有如下圖所示的這樣表示
因此來請教各位學長,希望可以請學長們給我一點指點,感激不盡。
範例(一)
https://imgur.com/a/Cnl7kq6
範例(二)
https://imgur.com/a/T2uugvk
自問自答:
addrule
Add a rule to an FIS.
Syntax
a = addrule(a,ruleList)
Description
addrule has two arguments. The first argument is the MATLAB workspace
variable FIS name. The second argument for addrule is a matrix of one or more
rows, each of which represents a given rule. The format that the rule list
matrix must take is very specific. If there are m inputs to a system and n
outputs, there must be exactly m + n + 2 columns to the rule list.
The first m columns refer to the inputs of the system. Each column contains a
number that refers to the index of the membership function for that variable.
The next n columns refer to the outputs of the system. Each column contains a
number that refers to the index of the membership function for that variable.
The m + n + 1 column contains the weight that is to be applied to the rule.
The weight must be a number between zero and one, and is generally left as
one.
The m + n + 2 column contains a 1 if the fuzzy operator for the rule's
antecedent is AND. It contains a 2 if the fuzzy operator is OR.
Examples
ruleList=[
1 1 1 1 1
1 2 2 1 1];
a = addrule(a,ruleList);
If the above system a has two inputs and one output, the first rule can be
interpreted as:
"If Input 1 is MF 1 and Input 2 is MF 1, then Output 1 is MF 1."
REF. https://edoras.sdsu.edu/doc/matlab/toolbox/fuzzy/addrule.html
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.43.9
※ 文章網址: https://www.ptt.cc/bbs/MATLAB/M.1528362999.A.264.html
→
06/08 11:02,
6年前
, 1F
06/08 11:02, 1F
對對對! 確實如此沒錯 謝謝學長喔
※ 編輯: automaton (140.112.43.9), 06/08/2018 14:08:23
MATLAB 近期熱門文章
PTT數位生活區 即時熱門文章