2.1.17.2.6.5 xatasymt


Description

Get the value of X at a vertical asymptote.

Syntax

double xatasymt( Curve & crv )

Parameters

crv
[input] curve whose asymptote is found

Return

Returns the value of X at a vertical asymptote.

Examples

EX1

// This is a self contained sample program for the function xatasymt, 
// Its sample data is created at the beginning of the program. 
// To run the program, enter the following command in the Script window:
//   xatasymt_ex1
// It returns like:
//   The value of X at the vertical asymptote of Y(Data2_B) = 1.000000

void xatasymt_ex1()
{
    double dxatasymt;

    Worksheet wks;
    wks.Create();
    Dataset myXDs(wks,0);
    Dataset myYDs(wks,1);
    String strYName = myYDs.GetName();

    //******* Create sample data *****************
    myXDs.SetSize(13);
    myYDs.SetSize(13);
    myXDs[0]=-20;     myYDs[0]=-3.04762;
    myXDs[1]=-14;     myYDs[1]=-3.06667;
    myXDs[2]=-8;     myYDs[2]=-3.11111;
    myXDs[3]=-2;     myYDs[3]=-3.33333;
    myXDs[4]=-1;     myYDs[4]=-3.5;
    myXDs[5]=0;     myYDs[5]=-4;
    myXDs[6]=1;     myYDs[6]=NANUM;
    myXDs[7]=2;     myYDs[7]=-2;
    myXDs[8]=3;     myYDs[8]=-2.5;
    myXDs[9]=4;     myYDs[9]=-2.66667;
    myXDs[10]=10;     myYDs[10]=-2.88889;
    myXDs[11]=16;     myYDs[11]=-2.93333;
    myXDs[12]=22;     myYDs[12]=-2.95238;
    //******** End of Sample Data Creation *******            
    
    Curve myCrv(myXDs,myYDs);    // Create a Curve object    
    
    dxatasymt = xatasymt(myCrv);  // Demonstration of xatasymt
    
    printf("The value of X at the vertical asymptote of Y(%s) = %f\n",
        strYName,dxatasymt);
}

Remark

The function used for fitting function parameter initialization.

Get the value of X at a vertical asymptote. If the asymptote has two branches then X is defined as X = (xatymax+xatymin)/2 and if the asymptote has a single branch then X is defined as either xatymax or xatymin depending on where the reciprocal of the slope of the curve is closest to zero.

See Also

yatasymt

Header to Include

origin.h

Reference