フィルターのクリア

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 Center および File ExchangeFuzzy Logic Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by