I checked the result with Matlab and a Python library, which is the same (-1.22). But with this library, the result is -0.833557. The fuzzy output seems correct, but I think the fuzzy composition points of the output are incorrectly calculated. Then, the defuzzification process gives an incorrect value.
I checked the result with Matlab and a Python library, which is the same (-1.22). But with this library, the result is -0.833557. The fuzzy output seems correct, but I think the fuzzy composition points of the output are incorrectly calculated. Then, the defuzzification process gives an incorrect value.
The ouput is:
The correct output (MATLAB):