🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Is there a function to get the curve index of the last point of a curve?

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

I want to use some templex functions for notes and text boxes that extract values from curves, such as the peak value and final value. For the peak, I can use the indexofmax(curve.id) function. Is there a similar one to get the final point? I wasn't able to find a similar command in the help.

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    I have not try it but how about using the next templatex function:

    {max(p1w1c1.x)}

    p1 = page 1

    w1 = window1

    c1 = curve 1

    this should give the max value in the X axis.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    The {max(p1w1c1.x)} function will give the maximum value of the x curve, but not the index number. However, I realized that I could just use the indexofmax(p1w1c1.x) rather than .y to get the index of the largest X value, rather than for the peak Y value.

    Thanks for idea though Cesar - it did get me to the right answer.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    mmhh, feels like I just did 'a homer' hehe!

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    You can find the index of the last point by using the following statement:

    {numpts(p1w1c1.y)-1}

    Regards,

    Liz