Advertisement
toweber

membership_tests_many

Sep 9th, 2021
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. import numpy as np
  2. import skfuzzy as fuzz
  3. import matplotlib.pyplot as plt
  4.  
  5. x = np.linspace(0,10,110)
  6.  
  7. mfx = fuzz.trimf(x, [0, 5, 10])
  8.  
  9. plt.plot(x,mfx)
  10. plt.show()
  11.  
  12. mfx = fuzz.trapmf(x, [0, 3, 7 , 10])
  13.  
  14. plt.plot(x,mfx)
  15. plt.show()
  16.  
  17. mfx = fuzz.gaussmf(x, 5, 2)
  18.  
  19. plt.plot(x,mfx)
  20. plt.show()
  21.  
  22. mfx = fuzz.zmf(x, 3, 7)
  23.  
  24. plt.plot(x,mfx)
  25. plt.show()
  26.  
  27. mfx = fuzz.smf(x, 3, 7)
  28.  
  29. plt.plot(x,mfx)
  30. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement