想在 Excel 中自带的VB 编写一个小计算公式求解方程
Function r(r1, r2, r3, a)For j = 2 To 1000
x = r1 * (1 - 0.001 * j)
y = 2 * x * (r1 - r2) + r1 * r1 - r2 * r2 + (r1 + r2) * (r1 + r2) - 2 * (r1 + r2) * Cos(a) * (r1 + x * (r1 - r3) / (r1 + r3)) - 2 * (r1 + r2) * Sin(a) * 2 / (r1 + r3) * Sqr(r1 * r3) * Sqr(x ^ 2 + x * (r1 + r3))
If y < 0 Then Next j
x = r1 * (1 - 0.001 * j)
y = 2 * x * (r1 - r2) + r1 * r1 - r2 * r2 + (r1 + r2) * (r1 + r2) - 2 * (r1 + r2) * Cos(a) * (r1 + x * (r1 - r3) / (r1 + r3)) - 2 * (r1 + r2) * Sin(a) * 2 / (r1 + r3) * Sqr(r1 * r3) * Sqr(x ^ 2 + x * (r1 + r3))
If y > 0 Then Exit For
End If
End If
End Function
主要想求求解以下方程:
R1,R2,R3,a 都是已知量,就是求r.
请哪位高手帮忙,万分感谢。