📄 plotset.m
字号:
%
% Syntax: plotset(Set,strLineType)
%
% Inputs: Set is a 1x5 vector for picurves, a single value for singletons.
% strLineType is a legal Matlab linetype argument, e.g. 'r-'.
%
% Result: The Set memberships are plotted against its universe in the
% current plot area. The universe axis limits are set to [-100;100]
% for input sets and to [-200;200] for output sets.
%
% Petur Snaeland, 30.04.1995.
%
function plotset(Set,strLineType)
if length(Set)==1,
%
% The fuzzy set is a singleton. Then use a [-200;200] universe and
% and let the singleton be 1, but all other elements 0.
%
MembershipFcn = zeros(1,401);
MembershipFcn(201+Set) = 1;
axis([-200 200 0 1]);
plot(-200:200,MembershipFcn,strLineType);
else
%
% The fuzzy set is a pi-curve. Then use a [-100;100] universe and
% compute the membership values for each element in the universe.
%
MembershipFcn = picurve(Set(1),Set(2),Set(3),Set(4),-100:100,Set(5));
axis([-100 100 0 1]);
plot(-100:100,MembershipFcn,strLineType);
end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -