EBSILON®Professional Online Documentation
EbsScript / EbsScript Interface Units / InterfaceUnit-Kovarianz (Covariance)
In This Topic
    InterfaceUnit-Kovarianz (Covariance)
    In This Topic

    InterfaceUnit - Covariance

    The functions of this interface unit are used for the administration of the covariances of measurement points according to VDI 2048.

    Name

    Purpose

    Arguments

    Return value

    Example

    covarianceAdd

    adds a new covariance entry (consisting of two measurement points and the correlation coefficient between them) to the list of covariance entries.

    1: CovarianceValue

    CovarianceErrorEnum:

    uses @Covariance;

    var

        n:integer;

        c:CovarianceValue;

        cerr:CovarianceErrorEnum;

    begin

        covarianceRemoveAll;

        n:=covarianceGetCount;

        println (n, " covariances");

        c.comp1:=Measuring_point;

        c.comp2:=Measuring_point_1;

        c.rvalue:=0.9;

        c.correlationType:=

                CorrelationTypeExplicit;

        cerr:=covarianceAdd(c);

        if (cerr =

          CovarianceErrorDuplicateCovalue)
          then

            println ("pair already existing");

        n:=covarianceGetCount;

        println (n, " covariances");

        c.comp2:=Measuring_point_2;

        c.rvalue:=0.8;

        cerr:=covarianceAdd(c);

        c.comp2:=Measuring_point_3;

        c.rvalue:=0.7;

        cerr:=covarianceAdd(c);

        c.comp2:=Measuring_point_1;

        c.rvalue:=0.9;

        cerr:=covarianceSetAt(1, c);

        n:=covarianceGetCount;

        println (n, " covariances");

        cerr:=covarianceRemoveAt(2);

        n:=covarianceGetCount;

        println (n, " covariances");

        covarianceGetAt(1, c);

        println ("Covariance 1: ",c.comp1,
            " ",c.comp2," ",c.rValue);

        covarianceGetAt(2, c);

        println ("Covariance 2: ",c.comp1,

            " ",c.comp2," ",c.rValue);

    end.

    covarianceGetAt

    retrieves the covariance entry at a specific position of the list of covariance entries.

    1: INTEGER:

    2: CovarianceValue

    CovarianceErrorEnum:

    covarianceGetCount

    retrieves the length of the list of covariance entries.

    -

    INTEGER:

    covarianceRemoveAll

    removes all entries in the list of covariance entries.

    -

    -

    covarianceRemoveAt

    removes the covariance entry at a specific position of the list of covariance entries.

     

    1: INTEGER:

    CovarianceErrorEnum:

    covarianceSetAt

    sets the covariance entry at a specific position of the list of covariance entries. This function can be used only to modify existing entries. To create new entries, use "covarianceAdd".

    1: INTEGER:

    2: CovarianceValue

    CovarianceErrorEnum: