2.2.3.5.3 curvebase::CopyData

Description

Copy curve's x value to vectorx and y value to vectory.

Syntax

bool CopyData( vector & vx, vector & vy, vector & yWeight = NULL, vector & xWeight = NULL )

Parameters

vx
[output] The curve's x value, size will set to curve's size
vy
[output] The curve's Y value, size will set to curve's size
yWeight
[output] The curve's Y weight
xWeight
[output] The curve's x weight

Return

TRUE for success, otherwise FALSE.

Examples

EX1

void curvebase_CopyData_ex1()
{
	//Assume active window is worksheet that contains two columns.
	Worksheet wks = Project.ActiveLayer();
	if( wks )
	{	
	    Curve crv(wks, 0, 1);
	    vector vDataX, vDataY, vDataYErr;
	    bool bOK = crv.CopyData(vDataX, vDataY);
	    out_int("bOK = ", bOK);
	}
}

Remark

See Also

DataRange::GetData, DataRange::GetNumData, DataRange::GetMaskedData, DataRange::GetMissingData

Header to Include

origin.h