Working on Fuzzy multi sets

7 Ansichten (letzte 30 Tage)
davut
davut am 18 Jun. 2023
Bearbeitet: Sharad am 19 Jun. 2023
Is it possible to work on fuzzy multi sets in fuzzy logic toolbox?

Antworten (2)

Sharad
Sharad am 19 Jun. 2023
Bearbeitet: Sharad am 19 Jun. 2023
Hi @davut,
  • The fuzzy logic toolbox does not directly support fuzzy multisets as a seperate data structure or class, and does not provide any built in functionality to create or operate fuzzy multisets.
  • However, it is possible to simulate the creation of fuzzy multisets and various operations on them using the already available fuzzy set functionalities.
  • Here is an example for the same.
% Define the universe of discourse
universe = (0:1:10);
% Define fuzzy sets
fuzzySet1 = trapmf(universe, [1, 3, 6, 8]);
fuzzySet2 = gaussmf(universe, [5, 2]);
fuzzySet3 = trimf(universe, [3, 6, 9]);
% Define fuzzy membership values for each element
membershipValues1 = [0.8, 0.4, 0.6, 0.2, 0.1, 0.0, 0.3, 0.7, 0.9, 0.5, 0.2];
membershipValues2 = [0.1, 0.3, 0.6, 0.8, 0.9, 1.0, 0.7, 0.4, 0.2, 0.5, 0.8];
In this example, we define fuzzy sets using various membership functions such as trapmf, gaussmf, and trimf for the universe of discourse. Also, we can define the membership values of each element as arrays membershipValues1 and membershipValues2.
  • Perform the operations that simulate the multiset operations.
unionSet = max(membershipValues1, membershipValues2);
intersectionSet = min(membershipValues1, membershipValues2);
complementSet = 1 - membershipValues1;
differenceSet = max(membershipValues1 - membershipValues2, 0);
  • Display the results which are similar to fuzzy multiset operations, using the disp function.

Shishir Reddy
Shishir Reddy am 19 Jun. 2023
Hi Davut,
As per my understanding, you want to work on fuzzy multisets. The important point is, the Fuzzy Logic Toolbox in MATLAB does not directly support fuzzy multisets. The toolbox primarily focuses on fuzzy sets and fuzzy logic operations.
However, you can still work with fuzzy multisets by using fuzzy sets as a representation. One approach is to consider each value in the fuzzy multiset as a separate fuzzy set with its own membership function. You can then perform fuzzy logic operations on these individual fuzzy sets to simulate operations on the fuzzy multiset.
Alternatively, you can consider implementing custom functions or extending the capabilities of the Fuzzy Logic Toolbox by developing your own functions or classes to handle fuzzy multisets. This would require more advanced knowledge of fuzzy logic and MATLAB programming.
Have a look at the following sample code:
% Fuzzy Set 1
x1 = [1 2 3 4 5]; % Elements
mfx1 = [0.3 0.5 0.8 0.9 0.6]; % Membership grades
% Fuzzy Set 2
x2 = [3 4 5 6 7]; % Elements
mfx2 = [0.2 0.7 1.0 0.8 0.4]; % Membership grades
% Convert fuzzy sets to individual fuzzy sets with separate membership functions
fuzzySet1 = {x1, mfx1};
fuzzySet2 = {x2, mfx2};
% Perform fuzzy operations on individual fuzzy sets
fuzzyUnion = union(fuzzySet1, fuzzySet2);
fuzzyIntersection = intersection(fuzzySet1, fuzzySet2);
fuzzyComplement = complement(fuzzySet1);
% Display the results
disp('Fuzzy Union:');
disp(fuzzyUnion);
disp('Fuzzy Intersection:');
disp(fuzzyIntersection);
disp('Fuzzy Complement:');
disp(fuzzyComplement);
For further reference, please refer these links to know more about ‘Fuzzy Logic Toolbox’
I hope this helps resolving the issue.

Kategorien

Mehr zu Fuzzy Logic Toolbox finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by