I have tried doing fuzzy simulation in MATLAB, so I got the expected output which later would be the same for arduino execution by using fuzzy library. However, in MATLAB, they got another option for defuzzification and fuzzification method such as MOM, LOM, SOM, and centroid.

So, how can I do the same for Arduino code? I would like to have the MOM defuzzification using Mamdani type of inference.