interpol Function

public elemental function interpol(x1, x2, y1, y2, x_obj) result(y)

Linear interpolation.

Calculates the linear interpolation between two points at a desired x value with the equation:

Since this function is defined as elemental it will also interpolate a set of vectors.

Examples of usage:

x1 = 2
x2 = 5
y1 = 2
y2 = 9
y = interpol(x1, x2, y1, y2, 2.3)
x1 = 2
x2 = 5
y1 = [2, 6]
y2 = [9, 15]
y = interpol(x1, x2, y1, y2, 2.3)

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: x1

First point x value

real(kind=pr), intent(in) :: x2

Second point x value

real(kind=pr), intent(in) :: y1

First point y value

real(kind=pr), intent(in) :: y2

Second point y value

real(kind=pr), intent(in) :: x_obj

Desired x value to interpolate

Return Value real(kind=pr)

y value at x_obj


Called by

proc~~interpol~~CalledByGraph proc~interpol interpol proc~check_critical_jump check_critical_jump proc~check_critical_jump->proc~interpol proc~detect_critical~3 detect_critical proc~detect_critical~3->proc~interpol proc~pt_envelope pt_envelope proc~pt_envelope->proc~check_critical_jump proc~pt_envelope->proc~detect_critical~3 proc~px_envelope px_envelope proc~px_envelope->proc~check_critical_jump proc~px_envelope->proc~detect_critical~3 proc~tx_envelope tx_envelope proc~tx_envelope->proc~detect_critical~3