custimp.m

来自「模糊控制工具箱,很好用的,有相应的说明文件,希望对大家有用!」· M 代码 · 共 14 行

M
14
字号
function y=custimp(x1,x2)
%CUSTIMP Customized implication function for CUSTTIP.FIS.
%   OUT = CUSTIMP(IN1,IN2) calculates the implication output.
%   The implication operator must be able to support either one
%   or two inputs, such that CUSTIMP(X1,X2) == CUSTIMP([X1 X2]).
%   Copyright 1994-2002 The MathWorks, Inc. 
%       $Revision: 1.8 $

if nargin==1,
    y=prod(x1).^2;
else
    y=(x1.*x2).^2;
end

⌨️ 快捷键说明

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