XYGetDataΒΆ

XYGetData returns all data points or a clipping of data points.

rmXY = XYGetData(hData)
rmXY = XYGetData(hData, bExt)
rmXY = XYGetData(hData, nFirst)
rmXY = XYGetData(hData, nFirst, nCount)
rmXY = XYGetData(hData, nFirst, nCount, bExt)

Return Value

rmXY is the 2 columned matrix of the data points. rmXY[;1] are the x-coordinates and rmXY[;2] are the y-coordinates.

Parameters

hData

The handle of a dataset created with XYCreate or TYCreate.

nFirst

nFirst is the index of the first data point. The first data point of the dataset has the index 1.

nCount

nCount is the number of points. If nCount is greater than the available data points in the dataset, the function returns the available data points: nCount = nData - (nFirst-1).

bExt

This parameter specifies if the function will access the original data or the filtered data.

Value Description
-1 If filtered data is available it will access filtered data, otherwise it will access original data. Default value is -1.
0 Access original data.
1 Access filtered data.

Comment

If the function is called with only one parameter all data points are returned.

If the function returns the original data the scaled data is returned (see XYSetScaleOffset).

Example

x = linspace(1, 100);
y = sin(x);
hvHandle = plot(x,y);
hData = hvHandle[3];
nCount = XYGetNumberOfPoints(hData);
// Get the last 50 points. Index: 51, 52, ... , 100
rmXY = XYGetData(hData, nCount - 50 + 1, 50);

History

Version Description
5.20.0 nCount modified. The parameter can be set to a number of points greater than the available data points.

id-1966329