|
请帮我注释如下这些代码:
Function Stdev(ParamArray Expr() As Variant) As String
Dim curSun As Double, curAverageBad As Double, curBadSquare As Double
Dim curAccuracy As Double
Dim ExprLen As Long
ExprLen = UBound(Expr) + 1
curAccuracy = Val("10000000000000000")
For i = 0 To ExprLen - 1
curSun = curSun + Val(Expr(i))
Next
curAverageBad = Fix(curSun / ExprLen)
For i = 0 To ExprLen - 1
curBadSquare = curBadSquare + (Val(Expr(i)) - curAverageBad) ^ 2
Next
If ExprLen <= 20 Then
Stdev = Fix(100 * Sqr(curBadSquare / (ExprLen - 1)) * curAccuracy + 0.5) / curAccuracy / 100
Else
Stdev = Fix(100 * Sqr(curBadSquare / ExprLen) * curAccuracy + 0.5) / curAccuracy / 100
End If
End Function
多谢了!
|
|