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.

evalfis

Perform fuzzy inference calculations

Syntax

output = evalfis(input,fismat)
output = evalfis(input,fismat,numPts)
[output,IRR,ORR,ARR] = evalfis(input,fismat)
[output,IRR,ORR,ARR] = evalfis(input,fismat,numPts)

Description

evalfis has the following input arguments:

  • input — Number or a matrix specifying input values. If input is an M-by-N matrix, where N is number of input variables, then evalfis takes each row of input as an input vector and returns the M-by-L matrix to the variable, output, where each row is an output vector and L is the number of output variables.

  • fismat — FIS structure to be evaluated.

  • numPts — Number of sample points on which to evaluate the membership functions over the output variable range, specified as an integer greater than 1. If you do not specify numPts, evalfis uses a default value of 101.

    To reduce the memory footprint while evaluating a Mamdani-type FIS, specify a smaller numPts value. Doing so sacrifices the accuracy of the defuzzified output value.

    Note

    • Specifying a low value for numPts can make the output area for defuzzification zero. In this case, the defuzzified output value is the midpoint of the output variable range.

    • numPts is not used by Sugeno-type systems.

The range labels for evalfis are as follows:

  • output: the output matrix of size M-by-L, where M represents the number of input values specified previously, and L is the number of output variables for the FIS.

    Note

    For a given set of input values, if an output variable is not in the antecedent of any firing rules, the defuzzified value of that output is the midpoint of its range.

The optional output arguments for evalfis are only calculated when the input argument is a row vector, (only one set of inputs is applied). These optional output variables are:

  • IRR — Result of evaluating the input values through the membership functions. This matrix is of the size numRules-by-N, where numRules is the number of rules, and N is the number of input variables.

  • ORR — Result of evaluating the output values through the membership functions. This matrix is of the size numPts-by-numRules*L, where numRules is the number of rules, and L is the number of outputs. The first numRules columns of this matrix correspond to the first output, the next numRules columns of this matrix correspond to the second output, and so forth. ORR does not apply to Sugeno-type systems.

  • ARRnumPts-by-L matrix of the aggregate values sampled at numPts along the output range for each output. ORR does not apply to Sugeno-type systems.

When invoked with only one output argument, evalfis computes the output vector, output, of the fuzzy inference system specified by the structure, fismat, for the input value specified by the number or matrix, input.

Examples

collapse all

fismat = readfis('tipper');
out = evalfis([2 1;4 9],fismat)
out = 

    7.0169
   19.6810

Introduced before R2006a

Was this topic helpful?