PDA

توجه ! این یک نسخه آرشیو شده می باشد و در این حالت شما عکسی را مشاهده نمی کنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : Fuzzy Arithmetic



donya88
06-02-2011, 02:01 AM
1.9 Fuzzy Arithmetic
1.9.1 Introduction
Fuzzy Logic provides a number of functions for performing fuzzy arithmetic. In this chapter, we will demonstrate these functions and the options associated with each function.
This loads the package.
In[1]:=http://pnu-club.com/imported/2011/06/2.gif
The arithmetic operations described in this chapter are designed to work with triangular or trapezoidal fuzzy numbers. The arithmetic functions are a little different than the rest of Fuzzy Logic's functions in that they operate on lists of numbers that represent vertices of fuzzy sets, rather than fuzzy sets themselves. This makes working with these operations a little awkward, but we show a convenient way to work with these functions in this section. For fuzzy arithmetic operations that work on actual fuzzy sets, see Chapter 1.10 Discrete Fuzzy Arithmetic (http://reference.wolfram.com/applications/fuzzylogic/Manual/10.html).
First we need to set up an appropriate universal space. Since we are working with fuzzy numbers, and since they can be positive or negative, our universal space should be semiotic around zero. The universal space should also be big enough so that the results of the arithmetic operations will still fall within the universal space. We change the default setting for universal space using the SetOptions command.
In[2]:=http://pnu-club.com/imported/2011/06/3.gif
Now that the universal space is defined, we need some fuzzy numbers. As mentioned earlier, these operations work on lists of vertices, so we create two lists now, which represent two triangular fuzzy numbers.
In[3]:=http://pnu-club.com/imported/2011/06/4.gif
In[4]:=http://pnu-club.com/imported/2011/06/5.gif
We can convert the list of vertices, num1 and num2, into actual fuzzy sets using the FuzzyTrapezoid function. You can look at the results with the FuzzyPlot function.
In[5]:=http://pnu-club.com/imported/2011/06/6.gif
In[6]:=http://pnu-club.com/imported/2011/06/7.gif
In[7]:=http://pnu-club.com/imported/2011/06/8.gif
http://pnu-club.com/imported/2011/06/9.gif
1.9.2 Fuzzy Arithmetic Functions
http://pnu-club.com/imported/2011/06/10.gif
http://pnu-club.com/imported/2011/06/11.gif
http://pnu-club.com/imported/2011/06/12.gif
http://pnu-club.com/imported/2011/06/13.gif
http://pnu-club.com/imported/2011/06/14.gif
http://pnu-club.com/imported/2011/06/15.gif
http://pnu-club.com/imported/2011/06/16.gif
http://pnu-club.com/imported/2011/06/17.gif
http://pnu-club.com/imported/2011/06/18.gif
http://pnu-club.com/imported/2011/06/19.gif
http://pnu-club.com/imported/2011/06/20.gif
http://pnu-club.com/imported/2011/06/21.gif
Fuzzy arithmetic operations.
Fuzzy Addition
FuzzyPlus[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the sum of the fuzzy numbers represented by the two lists. The fuzzy sum is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use the ReleaseHold function.
In[8]:=http://pnu-club.com/imported/2011/06/22.gif
Out[8]=http://pnu-club.com/imported/2011/06/23.gif
The result of the fuzzy addition of the two fuzzy numbers is an unevaluated fuzzy trapezoid. To evaluate the result as a normal fuzzy set, you must use Mathematica's ReleaseHold function. Below we plot our two original fuzzy sets with their sum. Notice the use of the ReleaseHold function.
In[9]:=http://pnu-club.com/imported/2011/06/24.gif
http://pnu-club.com/imported/2011/06/25.gif
Fuzzy Subtraction
FuzzyMinus[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the fuzzy difference between the two fuzzy numbers represented by the two lists. The fuzzy difference is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use ReleaseHold.
In[10]:=http://pnu-club.com/imported/2011/06/26.gif
Out[10]=http://pnu-club.com/imported/2011/06/27.gif
The fuzzy difference between the two fuzzy numbers is returned in the same form as the fuzzy sum. Here we plot the original fuzzy sets with their fuzzy difference.
In[11]:=http://pnu-club.com/imported/2011/06/28.gif
http://pnu-club.com/imported/2011/06/29.gif
Multiplication by a Constant
FuzzyConstantTimes[{a, b, c, d}, k] returns the fuzzy number that is the result of the multiplication of constant k by the fuzzy number represented by the list, {a, b, c, d}. The result is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use ReleaseHold.
In[12]:=http://pnu-club.com/imported/2011/06/30.gif
Out[12]=http://pnu-club.com/imported/2011/06/31.gif
In[13]:=http://pnu-club.com/imported/2011/06/32.gif
http://pnu-club.com/imported/2011/06/33.gif
Fuzzy Image
FuzzyImage[{a, b, c, d}] returns the image of the fuzzy number represented by the list {a, b, c, d}. The result is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use ReleaseHold.
In[14]:=http://pnu-club.com/imported/2011/06/34.gif
Out[14]=http://pnu-club.com/imported/2011/06/35.gif
The image of a fuzzy set is a new fuzzy set that is a mirror image of the first one flipped around zero. Here is a plot of our first fuzzy set and its image.
In[15]:=http://pnu-club.com/imported/2011/06/36.gif
http://pnu-club.com/imported/2011/06/37.gif
Fuzzy Multiplication
FuzzyMultiply[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the product of the fuzzy numbers represented by the two lists. The fuzzy product is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use the ReleaseHold function.
In[16]:=http://pnu-club.com/imported/2011/06/38.gif
Out[16]=http://pnu-club.com/imported/2011/06/39.gif
The result of the fuzzy multiplication of the two fuzzy numbers is an unevaluated fuzzy trapezoid. To evaluate the result as a normal fuzzy set, we must use the ReleaseHold function. Next we plot the approximate result of the fuzzy product.
In[17]:=http://pnu-club.com/imported/2011/06/40.gif
http://pnu-club.com/imported/2011/06/41.gif
Fuzzy Division
FuzzyDivide[{a1, b1, c1, d1}, {a2, b2, c2, d2}] returns the division of the fuzzy numbers represented by the two lists. The fuzzy division is returned as an unevaluated FuzzyTrapezoid. To evaluate the FuzzyTrapezoid, use the ReleaseHold function.
In[18]:=http://pnu-club.com/imported/2011/06/42.gif
Out[18]=http://pnu-club.com/imported/2011/06/43.gif
The result of the fuzzy division of the two fuzzy numbers is an unevaluated fuzzy trapezoid. To evaluate the result as a normal fuzzy set, we must use the ReleaseHold function. Next we plot the approximate result of the fuzzy division.
In[19]:=http://pnu-club.com/imported/2011/06/44.gif
http://pnu-club.com/imported/2011/06/45.gif

http://pnu-club.com/imported/2011/06/46.gif (http://reference.wolfram.com/applications/fuzzylogic/Manual/8.html)http://pnu-club.com/imported/2011/06/47.gifhttp://pnu-club.com/imported/2011/06/48.gif (http://reference.wolfram.com/applications/fuzzylogic/Manual/10.html)