本文介绍了使用 R 求解方程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在 R 中以数值方式求解以下形式的方程的根:
How might I solve for the roots of an equation of the following form numerically in R:
f(r)=r*c+1-B*c-exp(-M(B-r))其中 M、B 和 c 是已知常数.
Where M, B and c are known constants.
提前致谢.
推荐答案由于 R 无法完成此功能,您可能需要使用像 Sage 这样的超集包.Sage 包含 R 和许多其他包,可以使用网络浏览器界面执行您想要的操作.该网站是 www.sagemath/
Since R can not do this functionality you might want to use a superset package like Sage. Sage includes R and many other packages and can do what you want using a webbrowser interface. The site is www.sagemath/
示例位于:www.sagemath/doc/reference/sage/symbolic/relation.html
您可以尝试以下内容:www.sagenb/>
You can try stuff like the following at: www.sagenb/
var('r', 'c', 'B', 'M') f = r*c+1-B*c-exp(-M(B-r)) print solve(f, r)这样做的结果是:
r == (B*c + e^(-B + r) - 1)/c
r == (B*c + e^(-B + r) - 1)/c
更多推荐
使用 R 求解方程
发布评论