Documentation

evalmf

Generic membership function evaluation

Syntax

y = evalmf(x,mfParams,mfType) 

Description

evalmf evaluates any membership function, where x is the variable range for the membership function evaluation, mfType is a membership function from the toolbox, and mfParams are appropriate parameters for that function.

If you want to create your own custom membership function, evalmf still works, because it evaluates any membership function whose name it does not recognize.

Examples

expand all

Evaluate Membership Function

Evaluate a generalized bell-shaped membership function.

x=0:0.1:10;
mfparams = [2 4 6];
mftype = 'gbellmf';
y=evalmf(x,mfparams,mftype);

Plot the evaluation.

plot(x,y)
xlabel('gbellmf, P=[2 4 6]')

Was this topic helpful?