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
Intent Optional 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
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
Nodes of different colours represent the following:
Graph Key
Subroutine
Subroutine
Function
Function
Interface
Interface
Type Bound Procedure
Type Bound Procedure
Unknown Procedure Type
Unknown Procedure Type
Program
Program
This Page's Entity
This Page's Entity
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.