Get the value of Y at the minimum X value of a curve.
double yatxmin( Curve & crv )
Returns the value of Y at the minimum X value of a curve.
EX1
// This is a self contained sample program for the function yatxmin, // Its sample data is created at the beginning of the program. // To run the program, enter the following command in the Script window: // yatxmin_ex1 // This will return the result like following: // Y(Data2_B) at Minimum of X(Data2_A) = 0.3 void yatxmin_ex1() { double dYatXmin; Worksheet wks; wks.Create(); Dataset myXDs(wks,0); // X dataset should be monotonic String strXName = myXDs.GetName(); Dataset myYDs(wks,1); String strYName = myYDs.GetName(); //******* Create sample data ***************** myXDs.SetSize(8); myYDs.SetSize(8); myXDs[0]=1; myYDs[0]=0.3; myXDs[1]=2; myYDs[1]=0.097; myXDs[2]=3; myYDs[2]=0.41256; myXDs[3]=4; myYDs[3]=0.24909; myXDs[4]=5; myYDs[4]=0.47304; myXDs[5]=6; myYDs[5]=0.2476; myXDs[6]=7; myYDs[6]=0.64529; myXDs[7]=8; myYDs[7]=0.44514; //******** End of Sample Data Creation ******* Curve myCrv(myXDs,myYDs); // Create a Curve object dYatXmin = yatxmin(myCrv); // Demonstration of yatxmin printf("Y(%s) at Minimum of X(%s) = %g\n",strYName,strXName,dYatXmin); }
The function used for fitting function parameter initialization.
Yatxmax
origin.h