Shailrshah

Tau Membership Function

Feb 5th, 2016
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.18 KB | None | 0 0
  1. alpha=30;
  2. beta = 40;
  3. for i=1:10
  4.   x(i) = i*5
  5.   if x(i)<=alpha
  6.     y(i)=0;
  7.   elseif x(i)<=beta
  8.     y(i) = (x(i)-alpha)/(beta-alpha)
  9.   else
  10.      y(i)=1
  11.   end
  12. end
  13. plot(x,y)
Add Comment
Please, Sign In to add comment