提交 fd07cfc8 编写于 作者: Z zyts2206

Sat Apr 13 15:56:00 CST 2024 inscode

上级 7557b28d
......@@ -3,8 +3,8 @@ from sympy import symbols, Eq, solve
# 定义符号
R = symbols('R')
f_star = 0.1
p_value = 0.8
L_value = 0.1
p_value = 0.95
L_value = 0.10
# 解方程以找到 R 值
R_value = solve(Eq((p_value * R - (1 - p_value) * L_value) / (R * L_value), f_star), R)
......@@ -15,4 +15,17 @@ if R_value:
R_value, f_star, p_value, L_value
else:
"无法找到有效的 R 值"
print(R_value)
\ No newline at end of file
print(R_value)
R_new = 0.1
p_new = 0.85
# 计算 f_star = 0 时的 L 值(下界)
f_star_lower > 0
L_lower = calculate_L(p_new, R_new, f_star_lower)
# 计算 f_star = 1 时的 L 值(上界)
f_star_upper = 1
L_upper = calculate_L(p_new, R_new, f_star_upper)
print(L_lower, L_upper)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册