13 views (last 30 days)
Show older comments
davut on 18 Jun 2023
-
-
Link
Direct link to this question
https://matlabcentral.mathworks.com/matlabcentral/answers/1984874-working-on-fuzzy-multi-sets
Edited: Sharad on 19 Jun 2023
Is it possible to work on fuzzy multi sets in fuzzy logic toolbox?
0 Comments Show -2 older commentsHide -2 older comments
Show -2 older commentsHide -2 older comments
Sign in to comment.
Sign in to answer this question.
Answers (2)
Sharad on 19 Jun 2023
Edited: Sharad on 19 Jun 2023
Open in MATLAB Online
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.
0 Comments Show -2 older commentsHide -2 older comments
Show -2 older commentsHide -2 older comments
Sign in to comment.
Shishir Reddy on 19 Jun 2023
Open in MATLAB Online
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’
https://in.mathworks.com/products/fuzzy-logic.html
I hope this helps resolving the issue.
0 Comments Show -2 older commentsHide -2 older comments
Show -2 older commentsHide -2 older comments
Sign in to comment.
Sign in to answer this question.
See Also
Categories
Control SystemsFuzzy Logic ToolboxFuzzy Logic in Simulink
Find more on Fuzzy Logic in Simulink in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- Deutsch
- English
- Français
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)
Contact your local office