Herror ::sample_funct_1d (
    const HTuple &Function,
    const HTuple &XMin,
    const HTuple &XMax,
    const HTuple &XDist,
    const HTuple &Border,
    HTuple *SampledFunction
)

Sample a function equidistantly in an interval.

::sample_funct_1d samples the input function Function in the interval [XMin,XMax] at equidistant points with the distance XDist. The last point lies in the interval if XMax-XMin is not an integer multiple of XDist. To obtain the samples, the input function is interpolated linearly. The parameter Border determines the values of the function Function outside of its domain. For Border='zero' these values are set to 0, for Border='constant' they are set to the corresponding value at the border, for Border='mirror' they are mirrored at the border, and for Border='cyclic' they are continued cyclically.


Parameters

Function (input_control)
function_1d-array -> HTuple.double / long
Input function.

XMin (input_control)
number -> HTuple.double / long
Minimum x value of the output function.

XMax (input_control)
number -> HTuple.double / long
Maximum x value of the output function.
Restriction: XMax > XMin

XDist (input_control)
number -> HTuple.double / long
Distance of the samples.
Restriction: XDist > 0

Border (input_control)
string -> HTuple.char *
Border treatment for the input function.
Default value: 'constant'
List of values: 'zero', 'constant', 'mirror', 'cyclic'

SampledFunction (output_control)
function_1d-array -> HTuple.double *
Sampled function.


Possible Predecessors

::transform_funct_1d, ::create_funct_1d_array, ::create_funct_1d_pairs


Module

Tools



Copyright © 1996-2002 MVTec Software GmbH