newbie here. Not sure why this code is not executing.
I have an Array with some velocity data and I am trying to calculate a variable
-
for each speed point that is above o with one formula
-
for each speed point that is 0 with another formula.
Code below. Any help is greatly appreciated.
Private Sub RLF()
Dim v1
v1 = Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.2, 1.7, 5.4, 9.9, 13.1, 16.9, 21.7, 26, 27.5, 28.1, 28.3, 28.8, 29.1, 30.8)
Dim v(1 To 25) As Double
For i = 1 To 25 Step 1
If v(i) > 0 Then
v(i) = v1(i - 1) * 0.277778 ' kph to m/s
Else
v(i) = v1(i + 1) ' keep in m/s
Debug.Print v(i)
Next i
End Sub
Debug the error or a way to accomplish what I am trying to do
New contributor
Sashi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.