newfis.m
来自「交流 模糊控制 交流 模糊控制」· M 代码 · 共 49 行
M
49 行
function out=newfis(fisName,fisType,andMethod,orMethod,impMethod,aggMethod,defuzzMethod)
%NEWFIS Create new FIS.
% FIS=NEWFIS(FISNAME) creates a new Mamdani-style FIS structure
%
% FIS=NEWFIS(FISNAME, FISTYPE) creates a FIS structure for a Mamdani or
% Sugeno-style system with the name FISNAME.
%
% FIS=NEWFIS(FISNAME, FISTYPE, andMethod, orMethod, impMethod, ...
% aggMethod, defuzzMethod)
% specifies the methods for AND, OR, implication, aggregation, and
% defuzzification, respectively.
%
% See Also
% readfis, writefis
%
% Kelly Liu 4-5-96
% Copyright 1994-2002 The MathWorks, Inc.
% $Revision: 1.18 $ $Date: 2002/04/02 21:25:12 $
if (nargin>=1), name=fisName; end
if (nargin<2), fisType='mamdani'; else, fisType = fisType; end
if strcmp(fisType,'mamdani'),
if (nargin<3), andMethod='min'; end
if (nargin<4), orMethod='max'; end
if (nargin<7), defuzzMethod='centroid'; end
end
if (nargin<5), impMethod='min'; end
if (nargin<6), aggMethod='max'; end
if strcmp(fisType,'sugeno'),
if (nargin<3), andMethod='prod'; end
if (nargin<4), orMethod='probor'; end
if (nargin<7), defuzzMethod='wtaver'; end
end
out.name=name;
out.type=fisType;
out.andMethod=andMethod;
out.orMethod=orMethod;
out.defuzzMethod=defuzzMethod;
out.impMethod=impMethod;
out.aggMethod=aggMethod;
% Create default values for the FIS structure input output and rule
out.input=[];
out.output=[];
out.rule=[];
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?