Error while building a custom AND/OR function and Custom implication functions

I want to create a custom fuzzy operator 'bounded_sum' and I have defined it as
function out = bounded_sum( x , y)
%UNTITLED Summary of this function goes here
% Detailed explanation goes here
z=zeros(size(x);
out = min(1,x+y)
end
I am get following error
Error using bounded_sum (line 5) Not enough input arguments.
Error in evalfis (line 84) [output,IRR,ORR,ARR] = evalfismex(input, fis, numofpoints);
Error in ruleview (line 451) [v,irr,orr,arr]=evalfis(inputVector,fis, numPts);
Error in ruleview (line 313) ruleview #update
Error in fisgui (line 102) eval([tag '(fis);']);
Error while evaluating uimenu Callback
Kindly help me out.

댓글 수: 4

how did you call your function?
Actually function is called by the fuzzy toolbox while evaluting for my fis 'test'. I have referred to this link for creating custom operators.It says my 'bounded_sum' should be same as the operator max(x,y). Similar kind of error comes when I implement 'custom_imp' function. I am getting something wrong , help me out.
how your fuzzy toolbox calls this function?
This is the first step of the fis where for each fuzzy rule with multiple antecdents , a single number is obtained by applying a fuzzy operator(default toolbox contains AND and OR , i am trying a custom method).This is what my output of bounded_sum will be , a single no for each rule. On this number we further implement the corresponding implication method.

댓글을 달려면 로그인하십시오.

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 2월 10일
편집: Azzi Abdelmalek 2013년 2월 10일
Call your function%
x=rand(4,5);
y=rand(4,5)
out = bounded_sum( x , y)
% there is no error in your function, maybe it was not correctly called.
z=zeros(size(x)); % is enough
Jan
Jan 2013년 2월 10일
편집: Jan 2013년 2월 10일
Just a note: You can simplify your function:
function out = bounded_sum( x , y)
out = min(1, x + y);
end
A complete copy of the error message is usually helpful in the forum.

카테고리

도움말 센터File Exchange에서 Fuzzy Logic in Simulink에 대해 자세히 알아보기

태그

질문:

2013년 2월 10일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by