Option Explicit
Option Base 1
Private Sub cmdra_Click()
Dim j As Integer, dr() As Single, o1() As Single, b() As Single, Sc() As Single _
, w() As Single, w1() As Single, w2() As Single, Ra() As Single, t As Single
ReDim dr(365), o1(365), b(365), Sc(365)
Const Gsc = 0.082, Lz = 116.33
Dim m As Single, n As Single
ReDim w(96, 365, 24), w1(96, 365, 24), w2(96, 365, 24), Ra(72, 96, 365, 24)
For n = 41.1 To 41.7 Step 1 / 120
For m = 118.2 To 119 Step 1 / 120
For j = 1 To 365
For t = 0.5 To 23.5
dr(j) = 1 + 0.033 * Cos(2 * 3.1415926 * j / 365)
o1(j) = 0.409 * Sin(2 * 3.1415926 * j / 365 - 1.39)
b(j) = 2 * 3.1415926 * (j - 81) / 364
Sc(j) = 0.1645 * Sin(2 * b(j)) - 0.1255 * Cos(b(j)) - 0.025 * Sin(b(j))
w(m, j, t) = 3.1415926 * ((t + 0.06667 * (Lz - m) + Sc(j)) - 12) / 12
w1(m, j, t) = w(m, j, t) - 3.1415926 / 24
w2(m, j, t) = w(m, j, t) + 3.1415926 / 24
Ra(n, m, j, t) = 12 * Gsc * dr(j) * ((w2(m, j, t) - w1(m, j, t)) * Sin(n) * Sin(o1(j)) + Cos(n) * Cos(o1(j)) * (Sin(w2(m, j, t)) - Sin(w1(m, j, t)))) / 3.1415926
Next t
Next j
Next m
next n
end sub
VB提示是 w(m, j, t) = 3.1415926 * ((t + 0.06667 * (Lz - m) + Sc(j)) - 12) / 12
错了。。
我不太明白是哪里错了?请有识之士帮忙下 谢谢了