Calculation of the membership function

The sloping down line of membership function mG  passes through points (10, 1) and (30, 0). Let us say that the equation of the line is:

mG(x)=ax+b

  We apply this equation for x=10, mG =1 and x=30, mG =0:

1 =a10+b    (1)

0 =a30+b    (2)

(1)-(2):  1=-20a =>a=-0.05   (3)

(3) into (2): b= -30(-0.05)=>b=1.5

So the equation for the sloping down part of membership function mG is:

mG(x)=-0.05x+1.5  for    10< x<30

If x=19, like in the example, we substitute and find  mG(19)=0.55

We work similarly to derive the equation for the sloping up part of membership function mA. We note that it passes through points x=30, mA=1 and x=10, mA=0. This equation turns out to be:

mA(x)=0.05x-0.5  for    10< x<30

Upon substitution with x=19 we obtain:

mA(19)=0.45