📄 lr_mod.m
字号:
function [mu_M,X] = LR_mod(L,R,par,resX)% [mu_M,X] = LR_mod(L,R,par,resX)%% Creating the membershipfunction of a LR-fuzzy set.% par = [Xmin Xmax m n alpha beta mu_min mu_max] . % LR-fuzzy-set: the functions F=L and F=R are a reference function iff% F(0)=1, F(x)=F(-x), F(x) is nonincreasing on [0,+inf), F(x) = 1 for x \in [-1,+1] and 0% outside; F(x)=max(0,1-abs(x)^p), p>=0; F(x)=e^-abs(x)^p, p>=0; F(x)=1/(1+abs(x)^p), p>=0.% A fuzzy number M is said to be an L-R type flat fuzzy number iff% L((m-x)/alpha) for x<=m% mu_A(x)= 1 for m<x<n% R((x-n)/beta) for x>=n% For m=n M is a L-R type fuzzy number. L is for left and R for right reference. For m=n, m is% the mean value of M, alpha and beta are called left and right spreads, respectively. A fuzzy% number is denoted as: M=(m,n,alpha,beta)_LR .% Examples:% Trapezoid function : modlrset('tr','',[0,50,30,35,...],127)% Triangular function: modlrset('tr','',[0,50,30,30,...],200) ( m1=m2 ! )%% The membershipfunction mu_M is discrete with the resolution resX.% x contains the abscissa values.% ______% / \ beta is the distance between n and b.% __a/ m n \b___ alpha ------------ " -------- m and a.% % FSTB - Fuzzy Systems Toolbox% Copyright (c) 1993-1996 by Olaf Wolkenhauer% Control Systems Centre at UMIST% Manchester M60 1QD, UK% 28-Apr-1995 Xmin=par(1);Xmax=par(2);m=par(3);n=par(4);alpha=par(5);beta=par(6);%mu_min=par(7);mu_max=par(8);if all(L(1:2)=='tr') L='max(0,(1-x))'; R=L;end;mu_M = zeros(1,resX); X = linspace(Xmin,Xmax,resX); for i=1:resX; mu_M(i)=LR_eval(L,R,[Xmin,Xmax,m,n,alpha,beta],X(i));end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -