TiPlotChannel.GetYInterpolated

TiPlotChannel See Also

Used to get the interpolated Y value based on the X value.

function GetYInterpolated(XValue : Double; var YValue : Double): Boolean;

Description

Call the GetYInterpolated method to get the interpolated Y value based on the X value. The X value does not need to be an actual data point x value, but must be greater than or equal to the first data point x value and less than or equal to the last data point x value. If the y value can not be interpolated because of null data or the x value is outside the range of the dataset then the return value of the function will be False. If the interpolation is performed successfully, the return value will be True.

If this function returns a FALSE value, this means that the Interpolated Y Value could not be determined because the data point was either empty or null. To determine whether the value is empty or null, determine if the X value is within the range of X-Values for this channel. If the data is within the range of X-Values for the channel, then the data point was null. If the data is outside of the range of X Values, then the data point was empty.

Example

Delphi

ReturnValue := iComponent.Channel[0].GetYInterpolated(30.65, YValue);

C++ Builder

ReturnValue = iComponent->Channel[0]->GetYInterpolated(30.65, YValue);

Contents | Index | Previous | Next