%% Remove Membership Function from Fuzzy Variable
% Create a fuzzy variable with a specified range and add three membership functions

var = fisvar([0 10]);
var = addMF(var,"trimf",[0 2.5 5],"Name","small");
var = addMF(var,"trimf",[2.5 5 7.5],"Name","medium");
var = addMF(var,"trimf",[5 7.5 10],"Name","large");

% View the membership functions.

var.MembershipFunctions

% Remove the medium membership function from the variable.

var = removeMF(var,"medium");

% Verify that the membership was removed.

var.MembershipFunctions

% Copyright 2018 The MathWorks, Inc.