필터 지우기
필터 지우기

COAleft function creation for Fuzzy

조회 수: 2 (최근 30일)
Elisa
Elisa 2014년 9월 16일
댓글: Elisa 2014년 9월 17일
Hi everyone, I am trying to implement a custom function to insert in the fuzzy toolbox for defuzzification. In particular, I would like to create the function that returns the left centroid (center of area). The code I wrote is this:
if true
% function y = COAleft(xmf,ymf)
%COAleft COA left function
% Compute the left centroid for defuzzification process
total_area = sum(ymf);
if total_area == 0,
error('Total area is zero in centroid defuzzification!');
end
tmp = sum(ymf.*xmf)/total_area;
MIN = min(xmf);
for xmf = MIN:tmp
total_arealeft = sum(ymf);
y = sum(ymf.*xmf)/total_arealeft;
end
The problem is in the result: when I insert the function in the fuzzy toolbox, the result is the simple centroid of all the area. Do you have any suggestion? Thank you!
  댓글 수: 2
Image Analyst
Image Analyst 2014년 9월 16일
I don't know fuzzy but I know image processing. What is the "left" centroid? Is there also a "center centroid" and "right centroid"? How are they defined? I've only heard of centroid and weighted centroid.
Elisa
Elisa 2014년 9월 17일
I would like to make something similar to what reported here:
Janssen, J. A. E. B., et al. "Assessment of uncertainties in expert knowledge, illustrated in fuzzy rule-based models." Ecological Modelling 221.9 (2010): 1245-1251.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Fuzzy Logic Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by