Main Content

mf2mf

(To be removed) Translate parameters between membership functions

    mf2mf will be removed in a future release. Convert membership functions using dot notation on fismf objects instead. For more information, see Compatibility Considerations.

    Description

    example

    outParams = mf2mf(inParams,inType,outType) converts the parameters for one type of membership function into those of another membership function.

    Occasionally this translation results in lost information, so that if the output parameters are translated back into the original membership function type, the transformed membership function does not look the same as the original function.

    Examples

    collapse all

    Create parameters for a generalized bell-shaped membership function, then convert them to parameters for a triangular membership function. Plot both functions to compare.

    x = 0:0.1:5;
    mf1 = [1 2 3];
    mf2 = mf2mf(mf1,'gbellmf','trimf');
    plot(x,gbellmf(x,mf1),x,trimf(x,mf2))
    legend('Generalized bell-shaped','Triangle-shaped','Location','South')
    ylim([-0.05 1.05])

    The red triangular membership function plotted with the blue generalized bell-shaped membership function into which it was converted.

    Input Arguments

    collapse all

    Initial membership function parameters, specified as a vector.

    Initial membership function type, specified as one of the following membership functions.

    Membership function typeDescriptionFor more information
    'gbellmf'Generalized bell-shaped membership functiongbellmf
    'gaussmf'Gaussian membership functiongaussmf
    'gauss2mf'Gaussian combination membership functiongauss2mf
    'trimf'Triangular membership functiontrimf
    'trapmf'Trapezoidal membership functiontrapmf
    'sigmf'Sigmoidal membership functionsigmf
    'dsigmf'Difference between two sigmoidal membership functionsdsigmf
    'psigmf'Product of two sigmoidal membership functionspsigmf
    'zmf'Z-shaped membership functionzmf
    'pimf'Pi-shaped membership functionpimf
    'smf'S-shaped membership functionsmf

    Final membership function type, specified as one of the following membership functions.

    Membership function typeDescriptionFor more information
    'gbellmf'Generalized bell-shaped membership functiongbellmf
    'gaussmf'Gaussian membership functiongaussmf
    'gauss2mf'Gaussian combination membership functiongauss2mf
    'trimf'Triangular membership functiontrimf
    'trapmf'Trapezoidal membership functiontrapmf
    'sigmf'Sigmoidal membership functionsigmf
    'dsigmf'Difference between two sigmoidal membership functionsdsigmf
    'psigmf'Product of two sigmoidal membership functionspsigmf
    'zmf'Z-shaped membership functionzmf
    'pimf'Pi-shaped membership functionpimf
    'smf'S-shaped membership functionsmf

    Output Arguments

    collapse all

    Final membership function parameters, returned as a vector.

    Version History

    Introduced before R2006a

    expand all

    R2019b: Support for fuzzy inference system structures will be removed

    Support for representing fuzzy inference systems as structures will be removed in a future release. Use mamfis and sugfis objects with this function instead. To convert existing fuzzy inference system structures to objects, use the convertfis function.

    This change was announced in R2018b. Using fuzzy inference system structures with this function issues a warning starting in R2019b.