Add a list of rules to an existing FIS structure and return the updated FIS.
Each row of the rule_matrix represents one rule and has the form:
[in1_mf ... inM_mf out1_mf ... outN_mf weight connect]
where:
To express:
To omit an input or output, use 0 for the membership function index. The consequent connective is always "and".
For example, to express:
"If (input_1 is mf_2) or (input_3 is not mf_1) or (input_4 is very mf_1), then (output_1 is mf_2) and (output_2 is mf_1^0.3)."
with weight 1, the corresponding row of rule_matrix would be:
[2 0 -1 4.2 2 1.03 1 2]
For a complete example that uses addrule, see heart_disease_demo_1.m.
See also: heart_disease_demo_1, showrule.
Package: fuzzy-logic-toolkit