我有一个 22 linear equations 的系统(正好 22 个方程和 22 个未知数)在 Excel 电子表格中动态生成。有没有办法让 Excel 求解系统并为每个未知变量生成一个值?
Another SO question有很多关于用于求解此类方程的算法的有用信息。 Cramer's rule特别是看起来很有希望,但我不确定如何在 Excel 中实现它。
感谢任何帮助!
最佳答案
This page给出以下简单方法:
Enter the coefficient matrix in an nxn range.
Enter in the vector of constants in a n-tall column. Select a blank n-tall column. It is important that you not have only one cell selected.
Type, =MMULT(MINVERSE(coefficients_matrix_range), constants_vector_range) in the formula text box and press [CTRL][SHIFT][ENTER]. It is important that you not simply press [ENTER].
这应该足够工作,因为您只有一个小系统(22x22)。虽然理想情况下您不会直接反转矩阵,但在这种情况下这应该不重要。
你绝对不想要克莱默法则。由于其数值特性相当差,它的理论意义大于实际意义。
关于excel - 如何在 Excel 中求解线性方程组?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2254349/