Main Content

pimf

Pi-shaped membership function

Description

This function computes fuzzy membership values using a spline-based pi-shaped membership function. You can also compute this membership function using afismfobject. For more information, seefismf Object.

This membership function is related to thesmfandzmfmembership functions.

example

y= pimf(x,params)returns fuzzy membership values computed using a spline-based pi-shaped membership function. This membership function is the product of ansmf函数和一个zmffunction, and is given by:

f ( x ; a , b , c , d ) = { 0 , x a 2 ( x a b a ) 2 , a x a + b 2 1 2 ( x b b - a ) 2 , a + b 2 x b 1 , b x c 1 2 ( x c d c ) 2 , c x c + d 2 2 ( x d d - c ) 2 , c + d 2 x d 0 , x d }

To define the membership function parameters, specifyparamsas the vector [abcc].

Membership values are computed for each input value inx.

Examples

collapse all

Specify input values across the universe of discourse.

x = 0:0.1:10;

Evaluate membership function for the input values.

y = pimf(x,[1 4 5 10]);

Plot the membership function.

plot(x,y) title('pimf, P = [1 4 5 10]') xlabel('x') ylabel('Degree of Membership') ylim([-0.05 1.05])

Figure contains an axes object. The axes object with title pimf, P = [1 4 5 10] contains an object of type line.

Input Arguments

collapse all

Input values for which to compute membership values, specified as a scalar or vector.

Membership function parameters, specified as the vector [abcd]. Parametersaandddefine thefeetof the membership function, andbandcdefine itsshoulders.

Output Arguments

collapse all

Membership value returned as a scalar or a vector. The dimensions ofymatch the dimensions ofx. Each element ofyis the membership value computed for the corresponding element ofx.

Alternative Functionality

fismfObject

You can create and evaluate afismfobject that implements thepimfmembership function.

mf = fismf("pimf",P); Y = evalmf(mf,X);

Here,X,P, andYcorrespond to thex,params, andyarguments ofpimf, respectively.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

版本sion History

Introduced before R2006a