📄 nefevmf.m
字号:
function y=nefevmf(x,params,type) %NEFEVMF Evaluate membership function. % % Y=NEFEVMF(X, PARAMS, TYPE) % X is the input vector, PARAMS is the parameters % vector, and TYPE is either a string or a number % representing the type of membership function being % used ('trapmf', 'trimf' or 'gaussmf') % % For example: % % x = (0:0.2:10)'; % y1 = evalmf(x, [-1 2 3 4], 'pimf'); % y2 = evalmf(x, [3 4 5 7], 'trapmf'); % y3 = evalmf(x, [5 7 8], 'trimf'); % plot(x, [y1 y2 y3 y4]) % title('evalmf') % % See also GAUSSMF, TRAPMF, TRIMF. if isstr(type) tp = deblank(type); else tp = ''; end if (type == 1) | (strcmp(tp,'trimf')), y = trimf(x, params); return; elseif (type == 2) | (strcmp(tp,'trapmf')), y = trapmf(x, params); return; elseif (type == 3) | (strcmp(tp,'gaussmf')), y = gaussmf(x, params); return; else error('unsupported MF Type in NEFEVMF.'); return; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -