# 2.2.3.8.7 Matrix::GetXMin

## Description

Get the X coordinate associated with the leftmost column of the matrix.

## Syntax

double GetXMin( )const

## Return

Returns the X coordinate associated with the left most column of the matrix.

## Examples

EX1

// Set and get the X coordinate of the first column of a matrix
void Matrix_GetXMin_ex1()
{
// This sample code will print a message like below:
//   Target matrix is Matrix1.
//   Setting X min value succeeded.
//   Obtained X min value is -1.23457e+008
//   Check X min value by Matrix:Set Dimensions menu command if it is -1.234570e+008.
//
BOOL rc;

double dXMin;
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.SetXMin(-123.4567E6);  // Use SetXMin to set the X coordinate of last column
if(!rc) {
printf("  Error: SetXMin failed.\n");
return;
}
else printf("  Setting X min value succeeded.\n");
dXMin = Mat1.GetXMin();   // Use GetYMin to get the X coordinate of last column
printf("  Obtained X min value is %g\n", dXMin); // Print out coordinate
printf("  Check X min value by Matrix:Set Dimensions menu command if it is %e.\n",dXMin);
}

## 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 GetXMin function gets the X coordinate associated with the left most column of the matrix.

origin.h