【coeffR_a】
[code]Inputs: IndArray[Xsize](NumericArrayRef), DepArray[Ysize](NumericArrayRef), ArraySize(Numeric);Variables: var0(0), var1(0), var2(0), var3(0), var4(0), var5(0), var6(0), var7(0), var8(0), var9(0);
condition1 = MinList(Xsize, Ysize, ArraySize) > 1 ;
If condition1 Then Begin
var7 = 0;
var8 = 0;
var9 = 0;
For value1 = 1 To ArraySize Begin
var7 = var7 + (IndArray[value1] * DepArray[value1]);
var8 = var8 + Square(IndArray[value1]);
var9 = var9 + Square(DepArray[value1]);
End;
var3 = var7 - ArraySize * Average_a(IndArray, ArraySize) * Average_a(DepArray, ArraySize);
var4 = var8 - ArraySize * Square(Average_a(IndArray, ArraySize));
var5 = var9 - ArraySize * Square(Average_a(DepArray, ArraySize));
condition1 = var4 * var5 > 0 ;
If condition1 Then
var6 = SquareRoot(var4 * var5)
Else
var6 = 0;
If var6 <> 0 Then Begin
var0 = var3 / var6;
condition1 = var0 <= 1 AND var0 >= -1 ;
If condition1 Then
coeffR_a = var0
Else
coeffR_a = -2;
End
Else
coeffR_a = -2;
End
Else
coeffR_a = -2
[/code]
页:
[1]