mf.m

来自「最新模糊逻辑工具箱」· M 代码 · 共 28 行

M
28
字号
function out=mf(x,y)
% MF Fuzzy arithmetics object constructor
%    OUT = MF(X, Y) returns a fuzzy arithmetics object. Fuzzy arithmetics 
%    object overwrites MATLAB '+', '-', '*', and '/' operation with fuzzy
%    arithmetic oprations.
%
%    See also
%        fuzarith

% Copyright (c) 1994-98 by The MathWorks, Inc.
% $Revision: 1.2 $

%use colume vector
if size(x,1)<size(x,2),
    x=x';
end
if size(y,1)<size(y,2),
    y=y';
end
if size(x, 1)~=size(y, 1)
  disp('x and y should have the same size for mf object');
  out=[];
  return
end
out.x=x;
out.y=y;
out = class(out,'mf');

⌨️ 快捷键说明

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