Interpolation.LogLinearCurve Method

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.0.0

Overload List

LogLinearCurve(Double[], Double[]) Creates a piecewise linear interpolating curve with logarithmic x-axis scaling.
LogLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>) Creates a piecewise linear interpolating curve with logarithmic x-axis scaling.

LogLinearCurve(Double[], Double[])

Creates a piecewise linear interpolating curve with logarithmic x-axis scaling.
C#
public static PiecewiseInterpolatingCurve LogLinearCurve(
	double[] xValues,
	double[] yValues
)

Parameters

xValues  Double[]
The x-coordinates of the data points. Must be strictly increasing and positive.
yValues  Double[]
The y-coordinates of the data points.

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that interpolates linearly in log(x) space.

Remarks

This method creates a curve that is linear when plotted on a semi-log scale (log x-axis). This is useful for data that varies logarithmically with x, such as frequency response curves.

Exceptions

ArgumentNullExceptionxValues or yValues is null.
DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionxValues contains non-positive values or is not strictly increasing.

LogLinearCurve(ReadOnlySpan<Double>, ReadOnlySpan<Double>)

Creates a piecewise linear interpolating curve with logarithmic x-axis scaling.
C#
public static PiecewiseInterpolatingCurve LogLinearCurve(
	ReadOnlySpan<double> xValues,
	ReadOnlySpan<double> yValues
)

Parameters

xValues  ReadOnlySpan<Double>
The x-coordinates of the data points. Must be strictly increasing and positive.
yValues  ReadOnlySpan<Double>
The y-coordinates of the data points.

Return Value

PiecewiseInterpolatingCurve
A PiecewiseInterpolatingCurve that interpolates linearly in log(x) space.

Remarks

This method creates a curve that is linear when plotted on a semi-log scale (log x-axis). This is useful for data that varies logarithmically with x, such as frequency response curves.

Exceptions

DimensionMismatchException The lengths of xValues and yValues do not match.
ArgumentExceptionxValues contains non-positive values or is not strictly increasing.

See Also