Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
Private Function root_mean_square(s() As Variant) As Double
For i = 1 To UBound(s)
s(i) = s(i) ^ 2
Next i
root_mean_square = Sqr(WorksheetFunction.sum(s) / UBound(s))
End Function
Public Sub pythagorean_means()
Dim s() As Variant
s = [{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}]
Debug.Print root_mean_square(s)
End Sub

View file

@ -0,0 +1,16 @@
Function rms(iLow As Integer, iHigh As Integer)
Dim i As Integer
If iLow > iHigh Then
i = iLow
iLow = iHigh
iHigh = i
End If
For i = iLow To iHigh
rms = rms + i ^ 2
Next i
rms = Sqr(rms / (iHigh - iLow + 1))
End Function
Sub foo()
Debug.Print rms(1, 10)
End Sub