EBSILON®Professional Online Documentation
EbsScript / EbsScript Functions / Access to interpolation functions
In This Topic
    Access to interpolation functions
    In This Topic

    Access to interpolation functions

    For characteristic lines, it is possible to access the interpolation functions of the component from EbsScript, i.e. to determine the value of the characteristic line at one point. Additionally, the type and the attributes for the interpolation can be queried.

     

    For characteristics, there is an EbsScript type „ebscharline” with the following properties:

    Example:

    begin

    println ("Motor.CQ3NCV.interpolate(5000):",Motor.CQ3NCV.interpolate(5000));

    println ("Motor.CQ3NCV.interpolationtype:",Motor.CQ3NCV.interpolationtype);

    println ("Motor.CQ3NCV.interpolationorder:",Motor.CQ3NCV.interpolationorder);

    println ("Motor.CQ3NCV.extrapolationorder:",Motor.CQ3NCV.extrapolationorder);

    println ("Motor.CQ3NCV.splineborderstype:",Motor.CQ3NCV.splineborderstype);

    println ("Motor.CQ3NCV.splineborderleft:",Motor.CQ3NCV.splineborderleft);

    println ("Motor.CQ3NCV.splineborderright:",Motor.CQ3NCV.splineborderright);

    end;

    The function "interpolate” yields the y-value of the characteristic line for the x-value given as argument. The interpolationtype is

    In the case of interpolationtype=1, interpolationorder and extrapolationorder contain the respective orders for interpolation and extrapolation.

    In the case of interpolationtype=2, splineborderstype specifies how the boundary conditions for the spline interpolation are to be set:

    For splineborderstype=1 or 2, splineborderleft and splineborderright contain the appropriate limit values.

    It is also possible to change these attributes in the EbsScript.

     

    The function "interpolate"; can also be used for characteristic fields (matrices).  

    For matrices, there is an EbsScript type „ ebsmatrix” with the following properties:

     

    Example:

    begin

    println ("Motor.MXT2.interpolate(10,6000):",Motor.MXT2.interpolate(10,6000));

    println ("Motor.MXT2.sizex:",Motor.MXT2.sizex);

    println ("Motor.MXT2.sizey:",Motor.MXT2.sizey);

    println ("Motor.MXT2.data(1,3)",Motor.MXT2.data(1,3));

    println ("Motor.MXT2.interpolation2dtype:",Motor.MXT2.interpolation2dtype);

    end;

    In this case, "interpolate" needs two arguments (x- und y-value) and yields the value of the characteristic field at the respective position. With the first argument (x) an interpolation of the lines is carried out, with the second (y) an interpolation of the columns.

    The function sizex yields the number of the lines (including headline with the y-values).

    The function sizey yields the number of the columns (including the left column with the x-values).

    The function data (i,j) yields the value in line i and column j.

    The function interpolation2dtype yields the interpolation type: