为网络应用程序求解具有多个变量服务器站点的线性方程?可以用php吗?
我有一个关于 php 的一般问题。希望可以在这里提问。
您如何在网络中求解具有多个变量的线性方程?也许使用高斯消去法或......? php 可以实现并且值得推荐吗?
1500 + 100 w = 10,000 s
3000 + 1000 s = 3000 w
5000 + 2000 s + 100 w + 30 r = 150 r
=> s = 0,16 | w = 1,05 | r = 45,21
I have a gerneral question on php. Hope its ok to ask here.
How would you solve a linear Equation with multiple variables in the web? maybe using Gaussian elimination or ... ? Is it possible with php and recommendable?
1500 + 100 w = 10,000 s
3000 + 1000 s = 3000 w
5000 + 2000 s + 100 w + 30 r = 150 r
=> s = 0,16 | w = 1,05 | r = 45,21
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
无论您是否在网络上进行,这并不重要,都是同一类事情。我想到的是高斯消去法(可能带有一些旋转),这是我数值分析课程的第一个单元。
我假设 PHP 至少有一维数组和浮点数,所以它应该可以工作。显然,如果这是一个问题的话,C 或 Fortran 会给你更好的性能。
It doesn't really matter whether you're doing it on the web or not, it's the same sort of thing. Gaussian elimination (possibly with some pivoting) is what comes to mind, having been the first unit of my numerical analysis course.
I assume PHP has at least one-dimensional arrays and floating-point numbers, so it should work. Obviously, C or Fortran would give you better performance, if that's an issue.
请参阅寻找积极维护的 PHP 矩阵数学库
See Looking for actively maintained matrix math library for php