%% Evaluate Multiple Membership Functions
% Create a vector of three Gaussian membership functions.

mf = [fismf("gaussmf",[0.9 2.5],'Name',"low");
      fismf("gaussmf",[0.9 5],'Name',"medium");
      fismf("gaussmf",[0.9 7.55],'Name',"high")];

% Specify the input range over which to evaluate the membership functions.

x = (-2:0.1:12)';

% Evaluate the membership functions.

y = evalmf(mf,x);

% Plot the evaluation results.

plot(x,y)
xlabel('Input (x)')
ylabel('Membership value (y)')
legend("low","medium","high")

% Copyright 2018 The MathWorks, Inc.