⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 scurve.m

📁 为了下载东西
💻 M
字号:
function y = scurve(xl,xr,x,typ)
%
% Fuzzy s-curve
%
% function y = scurve(xl,xr,x,typ)
%
% xl        coordinate of the left break point
% xr        coordinate of the right break point
% x         running point from the universe
% typ       0=cosine (non-linear), 1=linear
%
% The curve extends to infinity on both sides.
% In a non-fuzzy set, xl = xr.

% Jan Jantzen, rev. 94-01-30

s = abs(xr - xl) ;
if xl == xr,
  % build Boolean set ;
  y = x >= xr ;
else
  if typ == 0,
    % build cosine curve
    y = (cos((x - xr)*pi/s) + 1)/2 ;
  else
    % build straight line
    y = min(1,(x - xl)/s) ;
  end ;
  y = min( x >= xl , y ) ;       % put 0's on the left
  y = max( x >= xr , y ) ;       % put 1's on the right
end ;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -