nefevmf.m
来自「模糊神经网络采用matlab编程 o install NEFCON follow」· M 代码 · 共 39 行
M
39 行
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 + =
减小字号Ctrl + -
显示快捷键?