flsset.m

来自「为了下载东西」· M 代码 · 共 25 行

M
25
字号
function z = flsset(Spread, Slope, Centre, X)
% Basic equation for FL Smidth's fuzzy sets
%
% function z = flsset(Spread, Slope, Centre, X)
%
% Spread    Controls width
% Slope     Controls slope
% Centre    Controls position
% X	    Input data
%
% Vector input produces vector output.

% Jantzen 940412

% Lines 1, 2 and 4 avoid division by 0 and
% at the same time allows vector input (a hack)

DivBy0 = X == Centre ;
X = X + (DivBy0*0.1) ;

z = 1 - exp(-(Spread ./ abs(Centre - X)).^Slope) ;

z = (z .* (~DivBy0)) + DivBy0 ;

⌨️ 快捷键说明

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