Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

trimf

Triangular-shaped membership function

Syntax

y = trimf(x,[a b c])

Description

The triangular curve is a function of a vector, x, and depends on three scalar parameters a, b, and c, as given by

f(x;a,b,c)={0,xaxaba,axbcxcb,bxc0,cx}

or, more compactly, by

f(x;a,b,c)=max(min(xaba,cxcb),o)

The parameters a and c locate the "feet" of the triangle and the parameter b locates the peak.

Examples

collapse all

x = 0:0.1:10;
y = trimf(x,[3 6 8]);
plot(x,y)
xlabel('trimf, P = [3 6 8]')
ylim([-0.05 1.05])

Introduced before R2006a

Was this topic helpful?