octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56008] [octave forge] (fuzzy-logic-toolkit) d


From: L. Markowsky
Subject: [Octave-bug-tracker] [bug #56008] [octave forge] (fuzzy-logic-toolkit) defuzz provides inaccurate result
Date: Tue, 23 Feb 2021 01:25:34 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0

Follow-up Comment #3, bug #56008 (project octave):

Thanks for your bug report. As Doug wrote in 2019, fuzzy logic doesn't depend
on precise accuracy, so either calculation will work just fine. But to answer
your question, trapz was used because we're finding the x-coordinate of the
centroid of a region defined by a set of points, that is, the centroid of an
area for which the x-axis is continuous, which is defined by a quotient of two
integrals. For your example, the centroid is 4.0870. The calculation you give
is for the centroid of discrete points, not a continuous area, but either is
just fine, and in the limit, they should converge. It's interesting to note
that matlab, according to its online documentation, uses your formula, which
is likely also more efficient. In the next release, I'll offer both versions
of the centroid defuzz method. Thanks again for your input.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56008>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]