This is documentation for an obsolete product.
Current products and services

 Documentation /  Fuzzy Logic /

DedicationsNew Features in This Release

0.1 Introduction

0.1.1 Fuzzy Logic

Fuzzy Logic is a collection of notebooks and packages that are designed to introduce fuzzy set theory and fuzzy logic in the Mathematica environment. The packages provided in Fuzzy Logic, combined with Mathematica, provide a powerful tool for studying fuzzy logic and for developing fuzzy applications. The notebooks provided with this package demonstrate how the various fuzzy logic functions are used, and they contain many worked examples showing how this package can be used in real-world applications.

Basic familiarity with Mathematica is assumed for use of Fuzzy Logic. For more information on Mathematica, see below or contact Wolfram Research, Inc.

New functions added to this updated version of Fuzzy Logic are described in 0_02_New_Features.nb.

0.1.2 The Manual

The manual is a collection of Mathematica notebooks that show the capabilities of Fuzzy Logic and demonstrate the use of all of the functions. Notebooks are interactive documents combining Mathematica input and output, text, and graphics. The materials for the manual come from a wide variety of sources; many of the examples are from works listed in the 1_14_Bibliography.nb notebook. The following is a brief description of the types of examples that can be found in each of the notebooks in the manual.


Demonstrates the functions used to create fuzzy sets and options associated with each of the functions.


Demonstrates the functions used to create fuzzy relations and the options associated with each of these functions.


Contains examples of different operations that can be applied to fuzzy sets, fuzzy relations, or both.


Contains examples of the various package functions for combining two or more fuzzy sets or fuzzy relations, including a full range of t-norm (intersection), s-norm (union), and averaging operators. Both standard and nonstandard operators are included.


Demonstrates the various ways to view fuzzy sets in this package, including a variety plotting methods.


Demonstrates the various ways to view fuzzy relations in this package, including different plot styles and membership matrices.


Shows how to perform a composition between two fuzzy relations.


Shows how to perform fuzzy inferences and demonstrates some applications of fuzzy inferencing for modeling and control.


Shows how to apply fuzzy arithmetic operations to fuzzy numbers. These functions are used only with triangular or trapezoidal fuzzy numbers.


Contains examples demonstrating the use of the discrete fuzzy arithmetic operations. These arithmetic operations work on any fuzzy sets or fuzzy numbers.


Contains examples demonstrating the use of the digital fuzzy sets and the multivalued logic functions.


Demonstrates the Fuzzy C-Means Clustering algorithm and shows an example.


Contains a partial list of the formulas for the various operations in Fuzzy Logic.


Contains a bibliography list for selected applications areas and theoretical topics.

0.1.3 The Demonstration Notebooks

The notebooks contained in the package consist of worked examples of various fuzzy topics that can be studied using Fuzzy Logic. If you are just learning fuzzy sets, the first three notebooks are a good place to start. These notebooks contain information about fuzzy concepts and the mathematics behind fuzzy sets. The following is a list describing all Fuzzy Logic notebooks.


Contains an introduction to fuzzy sets and compares and contrasts fuzzy sets with traditional sets.


Contains examples that demonstrate the use of the various operations that can be performed on fuzzy sets.


Introduces fuzzy relations and gives examples of creating, operating on, and using fuzzy relations.


Demonstrates how fuzzy sets and fuzzy relations can be used in real-world process modeling.


Introduces fuzzy logic control. This notebook contains a truck-backing control example and a step-by-step description of the design process.


Contains an introduction to fuzzy numbers and fuzzy arithmetic, as well as a number of examples demonstrating the use of fuzzy arithmetic.


Contains an introduction to analog, discrete, and digital fuzzy sets, as well as a number of examples demonstrating the different digital fuzzy numbers.


Describes a wide variety of practical situations in which fuzzy sets and fuzzy logic can be applied. Examples in this notebook are presented in a problem-solution format.

0.1.4 The Packages

Mathematica packages are files written in the Mathematica programming language. They contain Mathematica definitions that extend Mathematica's capabilities in a particular area. The packages contained in Fuzzy Logic contain definitions that allow Mathematica to work with fuzzy sets and fuzzy relations. In Fuzzy Logic, we attempted to adhere to the conventions of good Mathematica programming, so the packages can be used as models for your own algorithms. Fuzzy Logic notebooks make use of the definitions contained in the packages.

The packages are found in several files, all of which can be accessed by loading the FuzzyLogic` init file. The following is a list briefly describing the definitions that are contained in each package. The list is provided to allow you to view the code for a particular routine or group of routines. In addition to the packages, a manual is included with the code. The manual is a notebook that can be used either as an introduction to the functions in this package or as a quick reference to look up function names and uses.


Contains definitions that are used within one or more other packages. It contains the code that defines fuzzy sets and fuzzy relations.


Contains definitions that can be used to create fuzzy sets and fuzzy relations.


Contains definitions that take fuzzy sets or relations as arguments and returns a single value as output.


Contains functions that take fuzzy sets or fuzzy relations as inputs and returns a list of items as output.


Contains programs that take fuzzy sets or fuzzy relations as arguments and returns new fuzzy sets or fuzzy relations.


Contains definitions that can be used to aggregate two or more fuzzy sets or fuzzy relations. Definitions of intersections and unions can be found here.


Contains functions that average two or more fuzzy sets or fuzzy relations.


Contains functions to display fuzzy sets or fuzzy relations visually.


Contains functions that perform the composition of fuzzy relations.


Contains the definitions for performing fuzzy arithmetic with fuzzy numbers.


Contains the fuzzy logic inferencing functions that are used for fuzzy logic control and modeling.


Contains the digital fuzzy sets and the multivalued logic functions.


Contains the fuzzy clustering functions.

0.1.5 Loading the Package

After starting a Mathematica session, the proper functions must be loaded from Fuzzy Logic. There are a number of ways to do this.

The most convenient way is to load the subpackage FuzzyLogic` init. This can be done with the following command:


After entering the command above, all of the functions from Fuzzy Logic will be available. The subpackages containing the function will be automatically loaded when needed.

The Get command can be used instead of the Needs command, but if the package is already loaded and you try to reload it with the Get command, you may see some error messages. For this reason, we recommend using the Needs command. If you want to use the Get command, you can replace the word Needs with Get, or you can type the following:

    << FuzzyLogic`

If the package loading command fails, verify that the directory containing the Fuzzy Logic directory is on Mathematica's $Path. You can use the command AppendTo[$Path, "directory"]. For convenience, this should be in your init.m file.

0.1.6 Getting More Information about Mathematica

For information on standard Mathematica operations and packages or for general Mathematica information, Mathematica: A System for Doing Mathematics by Computer, Fourth Edition by Stephen Wolfram is the definitive reference. There are a number of books that describe programming in the Mathematica language; we found Roman Maeder's programming books to be very helpful. In addition to these resources, there are many additional books and magazines that are dedicated to providing information about Mathematica. For a comprehensive list of resources or for further information regarding Mathematica, check the Wolfram Research website at

0.1.7 Getting More Information about Fuzzy Sets

There are a large number of good publications about fuzzy sets and fuzzy logic on the market. The sources we used to create this package are listed in the 1_14_Bibliography.nb notebook in the Notebooks folder. We recommend looking at these sources to provide a better understanding of fuzzy concepts and to get ideas for different applications. A partial list of the formulas used in this package is provided in the 1_13_Appendix.nb notebook (in the Notebooks folder).

0.1.8 Acknowledgments

We would like to thank the following people who have been of great assistance during the development of Fuzzy Logic. Dr. Leszek Sczaniecki, formerly Director of Applications at Wolfram Research, Inc., was instrumental in the design and development of the package. He also contributed significantly to the improvements of the present version, primarily the documentation. Thanks to Wolfram Research, Inc., in particular John Novak, Julia Guelfi, and Rebecca Bigelow for helping us develop this package. Thanks to Dr. Maria E. Kochanska, who wrote a special package in Basic for graphical interpretation of fuzzy sets and its operations in 1982. We are grateful to Med. D. Pawel P. Stachowicz for his fabulous Fuzzy as Hell-1989 and Robert Walker for his Ann-1992 programs written for fuzzy modeling. A special thanks to Jonathan Andersh, who wrote the educational version of the program. Thanks to Sister Maria Magdalena for helping with proofreading. Thanks to all the members of the Laboratory for Intelligent Systems at the University of Minnesota Duluth for their helpful comments. Thanks to Bei Tang for her beautiful cluster of the fuzzy flowers. Thanks to Dan Holmdahl for his CapitalLSlashukasiewicz logic notebook. Finally, we would like to thank Dr. Stachowicz's Fuzzy Set Theory and Its Applications classes and students Chaohui Yang, Guangji Shi, Dan Yao, and Ben Anderson, who used this package for homework assignments and provided useful comments.

0.1.9 About the Authors

Marian S. Stachowicz is a professor and Jack Rowe Chair at the University of Minnesota, Duluth. He heads the Laboratory for Intelligent Systems in the Electrical and Computer Engineering Department. He is also a graduate professor for the Computer Science Department at UM, Duluth campus, and the ECE Department and Control Science and Dynamical Systems Department at UM, Twin Cities campus. He received his M.S. degree in Control and Computer Engineering from LETI, Soviet Union, and both his Ph.D. and D.Sc. from A G-H, Poland. Dr. Stachowicz received two awards from the Polish Ministry of Higher Education and Science for the introduction of the digital fuzzy sets into the fuzzy set theory, which has facilitated applications of the fuzzy set theory to computer engineering. His work centers on artificial intelligence and soft computing, decision analysis, and control. Recently, he had worked for Berkeley Initiative in Soft Computing, University of California, Berkeley. He is a member of the North American Fuzzy Information Processing Society, a member of the International Fuzzy Systems Associations, a Senior Member of IEEE, and a consultant for large multinational corporations.

Lance E. Beall has a Bachelor of Computer Engineering degree from the University of Minnesota, Duluth, where he graduated summa cum laude. He is currently working for Medtronic and pursuing a Master's Degree at the University of Minnesota, Twin Cities.

DedicationsNew Features in This Release