We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
您可以将 n 次线性方程写为一个矩阵方程来求解。在这里你可以找到很好的例子:
http://blogs.mathworks .com/pick/2007/09/13/matlab-basics-video-solving-linear-equations/(视频!)
另请参阅这些页面:
http://en.wikipedia.org/wiki/System_of_linear_equations
http://en.wikipedia.org/wiki/Matrix_equation
You can write n-linear equations as one matrix equation to solve it. Here you can find great example:
http://blogs.mathworks.com/pick/2007/09/13/matlab-basics-video-solving-linear-equations/ (video!)
See also these pages:
http://en.wikipedia.org/wiki/System_of_linear_equations
http://en.wikipedia.org/wiki/Matrix_equation
您可以通过多种方式求解线性系统,具体取决于是否存在唯一解。
一种简单的方法是将其简化为简化梯形形式(rref)。
考虑系统:
您可以将系数矩阵 A 和 RHS、B 写成如下:(
'
是转置运算符)您可以将其写为增广矩阵 (A|B):
然后找到 REF(A|B)
因此 x ~ .8182, y ~ .6364。
You can solve a linear system in various ways, depending on whether there exists a unique solution or not.
A simple way is by reducing it to reduced-echelon form (rref).
Consider the system:
You can write the coefficient matrix A, and the RHS, B as follows: (
'
is the transpose operator)You can write it as an augmented matrix (A|B):
And then find the REF(A|B)
And hence x ~ .8182, y ~ .6364.
在 MATLAB 中求解线性方程的绝对最快方法就是在表格上设置方程
,然后通过求解。
您可以通过问题
查找有关矩阵除法及其限制的更多信息。
The absolutely fastest way to solve linear equations in MATLAB is simply to setup your equation on the form
and then solve by
You can issue
to find more information on matrix division and what limitations it has.
迭代法 Guase Seidel 的代码
tol 是容错能力
x0 是解的第一个猜测
A Code for iterative method Guase Seidel
tol is error tolerance
x0 is first guess for solution