Description
Adds a new 2x2 correlation matrix to the collection, assigns two inputs to it, and specifies the correlation matrix values. A name for the matrix is automatically generated. This is a shortcut for making a simple 2x2 matrix. To make a larger matrix, you must use the RDKCorrelations collection Add method instead.
Syntax
object.AddDependency(Input1 as Variant, Input2 as Variant, coefficient as Double)
Arguments
Input1 (Required Variant) – the name, index, or object reference of the first input object to correlate.
Input2 (Required Variant) – the name, index, or object reference of the second input object to correlate.
coefficient (Required Double) – the correlation coefficient. Must be a number between –1 and +1.
Return Value
(RDKCorrelation) – the new correlation object.
Example
'Make a 2x2 matrix relating InputA and InputB with a correlation coeff of .5:
RDKApp.Correlations.AddDependency("InputA", "InputB", .5)
'The one line of code above is equivalent to the following more complicated code:
With RDKApp.Correlations.Add("InputA:InputB", 2, 1)
.Matrix(1,2) = .5
Set .Inputs(1) = RDKApp.Inputs("InputA")
Set .Inputs(2) = RDKApp.Inputs("InputB")
End With