home Forums # Technical Support Trapezoid function

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1190
    AvatarRana
    Participant

    Hi Juan,

    I tried to use the trapezoid function with an input as follows:
    input->addTerm(new fl::Trapezoid(“R”, 0, 0.000, 1.000, 3.000));
    input->addTerm(new fl::Trapezoid(“D”, 7.000, 8.000, 10.000, 10.000));
    the problem is that when i set the input to 0 or 10, the grade of membership function is zero, despite it should be one.
    So i think that the first condition in Trapezoid::membership function should be changed to:
    if (Op::isLt(x, _a) or Op::isGt(x, _d))
    what do you think?

    Also how to make the eclipse see this change since it still sees the old one “if (Op::isLE(x, _a) or Op::isGE(x, _d))” despite i changed it in the cpp file.

    Thanks for your help.

    #1191

    Hi Rana,

    Thank you for your post.

    As you noticed, fuzzylite v4.0 has an issue with Trapezoids when a=b or c=d. The same occurs with Triangles when a=b or b=c. The solution is exactly what you mention. I have addressed these details in version 5.0, which I expect to release the first week of August.

    In order to fix these issues, you will need to recompile the library such that Eclipse takes the modifications.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.