How do I import a function returned value to a Fuzzy Inference System?

1 view (last 30 days)
I built a FIS using fuzzy logic toolbox I want the standard deviation(SD) of a function to be given as input to gaussian MF of a FIS. I stored the value in a variable and gave that SD to FIS by opening .fis file in editor it's giving the following error
Error using eval
Undefined function or variable 'zl'.
Error in readfis (line 150)
MFParams=eval(MFStr((typeEnd+1):length(MFStr)));
Error in test (line 7)
fismat=readfis('FPSP');
My code is
[System]
Name='FPSP'
Type='mamdani'
Version=2.0
NumInputs=2
NumOutputs=1
NumRules=4
AndMethod='min'
OrMethod='max'
ImpMethod='min'
AggMethod='max'
DefuzzMethod='centroid'
[Input1]
Name='trag'
Range=[180 225]
NumMFs=2
MF1='low':'gaussmf',[8.5348 180]
MF2='high':'gaussmf',[3.2258 225]
[Input2]
Name='avgdist'
Range=[40 110]
NumMFs=3
MF1='low':'gaussmf',[zl 40]
MF2='high':'gaussmf',[zr 110]
MF3='med':'gaussmf',[13.76 75]
[Output1]
Name='Decision'
Range=[0 1]
NumMFs=2
MF1='left':'gaussmf',[0.1699 0]
MF2='right':'gaussmf',[0.1699 1]
[Rules]
2 0, 2 (1) : 1
1 0, 1 (1) : 1
2 1, 2 (1) : 1
0 2, 1 (1) : 1
and main execution is from
zl=LLD();
zr=RLD();
fismat=readfis('FPSP');
out = evalfis([100 100],fismat);
dispaly(out);
Please help to fix the issue. Thanks.

Answers (0)

Categories

Find more on Fuzzy Inference System Modeling in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!