求vb高手解答!让让最后迭代出来的mp按照rj的区间进行调整,但是结果却是变得乱七八糟的!不知道怎么回事
Label1:If0<=rj<=1.046Or5.76<rj<6.283Thenmim=(mrf+t399)/msIfmim>0Thenmii(i)=mimmii1(i)...
Label1:
If 0 <= rj <= 1.046 Or 5.76 < rj < 6.283 Then
mim = (mrf + t399) / ms
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
ElseIf 1.046 < rj <= 2.62 Then
mim = (mrf + t399) / ms
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
ElseIf 2.62 < rj <= 4.19 Then
mim = (mrf3 + t399) / ms3
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
ElseIf 4.19 < rj <= 5.76 Then
mim = (mrf3 + t399) / ms3
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
End If
Label2: Next k4
Next k3
Next k2
Next k1
mp = mii(0)
For p = 1 To i
If p >= i - 1 Then
Exit For
End If
If (mii(p) < mp) Then
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text6.Text = ""
If 1.046 < rj < 4.19 Then
mp = mii(p) * (1 - 2 * jsd)
Else
End If
If 0 < rj < 1.046 Or 4.19 < rj < 6.283 Then
mp = mii(p) * (1 + 2 * jsd)
Else
End If
uu(p) = u(0) + mii2(p) * (2 * H - b / 2) / 50
Text2.Text = Str(uu(p))
vv(p) = v(0) + 0.02 * mii3(p) * (H - hh)
If vv(p) <= 0 Then
vv(p) = H - H1
Else: vv(p) = v(0) + 0.02 * mii3(p) * (H - hh)
End If
Text3.Text = Str(vv(p))
aa(p) = a(0) + 1 * mii1(p) * 3.1415926 / 180
jj(p) = j(0) + 0.04 * mii4(p) * (1.571 - j(0))
Text4.Text = Str(aa(p)) * 180 / 3.1415926
Text5.Text = Str(rr(p))
If Str(jj(p)) * 180 / 3.1415926 < 30 Then
Text6.Text = (Str(jj(p)) * 180 / 3.1415926) + 30
Else
Text6.Text = Str(jj(p)) * 180 / 3.1415926
End If
End If
Next p
Form2.Text1.Text = Str(mp)
End Sub
If 1.046 < rj < 4.19 Then
mp = mii(p) * (1 - 2 * jsd)
Else
End If
If 0 < rj < 1.046 Or 4.19 < rj < 6.283 Then
mp = mii(p) * (1 + 2 * jsd)
Else
End If
就是这块的调整!以前只是mp=mii(p),但是不是我要的,所以进行了调整,就变成了这个样子,求高手解答!谢谢了! 展开
If 0 <= rj <= 1.046 Or 5.76 < rj < 6.283 Then
mim = (mrf + t399) / ms
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
ElseIf 1.046 < rj <= 2.62 Then
mim = (mrf + t399) / ms
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
ElseIf 2.62 < rj <= 4.19 Then
mim = (mrf3 + t399) / ms3
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
ElseIf 4.19 < rj <= 5.76 Then
mim = (mrf3 + t399) / ms3
If mim > 0 Then
mii(i) = mim
mii1(i) = k1
mii2(i) = k2
mii3(i) = k3
mii4(i) = k4
rr(i) = R
i = i + 1
End If
End If
Label2: Next k4
Next k3
Next k2
Next k1
mp = mii(0)
For p = 1 To i
If p >= i - 1 Then
Exit For
End If
If (mii(p) < mp) Then
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text6.Text = ""
If 1.046 < rj < 4.19 Then
mp = mii(p) * (1 - 2 * jsd)
Else
End If
If 0 < rj < 1.046 Or 4.19 < rj < 6.283 Then
mp = mii(p) * (1 + 2 * jsd)
Else
End If
uu(p) = u(0) + mii2(p) * (2 * H - b / 2) / 50
Text2.Text = Str(uu(p))
vv(p) = v(0) + 0.02 * mii3(p) * (H - hh)
If vv(p) <= 0 Then
vv(p) = H - H1
Else: vv(p) = v(0) + 0.02 * mii3(p) * (H - hh)
End If
Text3.Text = Str(vv(p))
aa(p) = a(0) + 1 * mii1(p) * 3.1415926 / 180
jj(p) = j(0) + 0.04 * mii4(p) * (1.571 - j(0))
Text4.Text = Str(aa(p)) * 180 / 3.1415926
Text5.Text = Str(rr(p))
If Str(jj(p)) * 180 / 3.1415926 < 30 Then
Text6.Text = (Str(jj(p)) * 180 / 3.1415926) + 30
Else
Text6.Text = Str(jj(p)) * 180 / 3.1415926
End If
End If
Next p
Form2.Text1.Text = Str(mp)
End Sub
If 1.046 < rj < 4.19 Then
mp = mii(p) * (1 - 2 * jsd)
Else
End If
If 0 < rj < 1.046 Or 4.19 < rj < 6.283 Then
mp = mii(p) * (1 + 2 * jsd)
Else
End If
就是这块的调整!以前只是mp=mii(p),但是不是我要的,所以进行了调整,就变成了这个样子,求高手解答!谢谢了! 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询