2.2.3.8.10 Matrix::GetYMin

Description

Get the Y coordinate associated with the first row of the matrix.

Syntax

double GetYMin( )const

Parameters

Return

Returns the Y coordinate associated with the first row of the matrix.

Examples

EX1

// Set and get the Y coordinate of the first row of a matrix
void Matrix_GetYMin_ex1()
{
// This sample code will print a message like below:
// Target matrix is Matrix1.
// Setting Y min value succeeded.
// Obtained Y min value is -1.23457e+008
// Check Y min value by Matrix:Set Dimensions menu command if it is -1.234570e+008.
//
    BOOL rc;
    
    double dYMin;
    matrix<double> mat1 = {
        {1,  2},
        {3,  4},
        {5,  6}
    };

    MatrixPage MatPg1;
    MatPg1.Create("Origin");
    MatrixLayer MatLy1 = MatPg1.Layers(0);
    Matrix Mat1(MatLy1);
    Mat1 = mat1;
    printf("  Target matrix is %s.\n",Mat1.GetName());

    rc=Mat1.SetYMin(-123.4567E6);  // Use SetYMin to set the Y coordinate of last row
    if(!rc) {
        printf("  Error: SetYMin failed.\n");
        return;
    }
    else printf("  Setting Y min value succeeded.\n");
    dYMin = Mat1.GetYMin();   // Use GetYMin to get the Y coordinate of last row
    printf("  Obtained Y min value is %g\n", dYMin); // Print out coordinate
    printf("  Check Y min value by Matrix:Set Dimensions menu command if it is %e.\n",dYMin);
}

Remark

In addition to the values displayed in the cells of an internal Origin matrix (nominally Z values), Origin matrices map X coordinate values to the columns and Y coordinate values to the rows of the matrix. The GetYMin function gets the Y coordinate associated with the first row of the matrix.

See Also

Matrix::GetXMin, Matrix::GetXMax, Matrix::GetYMax, Matrix::SetXMin, Matrix::SetYMin, Matrix::SetXMax, Matrix::SetYMax, Matrix::GetXValue, Matrix::GetYValue

Header to Include

origin.h