问题:
求解线性方程组AX=b,其中
A
=
(
1
0
7
3
3
1.5
3.6
10
7
8
2
0.5
−
3
8.5
0
9
−
4
22
21
90
7
4
33
6
−
20
)
A=\left( \begin{array}{c} \begin{array}{c} 1\\ 0\\ \end{array}\\ 7\\ 3\\ 3\\ \end{array}\begin{array}{c} \begin{array}{c} 1.5\\ 3.6\\ \end{array}\\ 10\\ 7\\ 8\\ \end{array}\begin{array}{c} \begin{array}{c} 2\\ 0.5\\ \end{array}\\ -3\\ 8.5\\ 0\\ \end{array}\begin{array}{c} 9\\ -4\\ 22\\ \begin{array}{c} 21\\ 90\\ \end{array}\\ \end{array}\begin{array}{c} \begin{array}{c} 7\\ 4\\ \end{array}\\ 33\\ 6\\ -20\\ \end{array} \right)
A=⎝⎜⎜⎜⎜⎛107331.53.6107820.5−38.509−422219074336−20⎠⎟⎟⎟⎟⎞,
b
=
(
3
−
4
20
5
16
)
b = \left( \begin{array}{c} \begin{array}{c} 3\\ -4\\ \end{array}\\ 20\\ 5\\ 16\\ \end{array} \right)
b=⎝⎜⎜⎜⎜⎛3−420516⎠⎟⎟⎟⎟⎞
求解:
则在MATLAB命令行窗口输入命令:
回车后得到输出:
注意:输入矩阵时,同一行元素之间用逗号或空格分隔,不同行之间用分号分隔。
参考书籍:《科学计算与MATLAB语言》