| Fuzzy Logic Toolbox | ![]() |
Syntax
fis2 = parsrule(fis,txtRuleList) fis2 = parsrule(fis,txtRuleList,ruleFormat) fis2 = parsrule(fis,txtRuleList,ruleFormat,lang)
Description
This function parses the text that defines the rules (txtRuleList) for a MATLAB workspace FIS variable, fis, and returns a FIS structure with the appropriate rule list in place. If the original input FIS structure, fis, has any rules initially, they are replaced in the new structure, fis2. Three different rule formats (indicated by ruleFormat) are supported: 'verbose', 'symbolic', and 'indexed'. The default format is 'verbose'. When the optional language argument, lang, is used, the rules are parsed in verbose mode, assuming the key words are in the language, lang. This language must be either 'english', 'francais', or 'deutsch'. The key language words in English are if, then, is, AND, OR, and NOT.
Examples
a = readfis('tipper'); ruleTxt = 'if service is poor then tip is generous'; a2 = parsrule(a,ruleTxt,'verbose'); showrule(a2) ans = 1. If (service is poor) then (tip is generous) (1)
See Also
addrule, ruleedit, showrule
| newfis | pimf | ![]() |