作业帮 > 数学 > 作业

用Mathematica解线性方程组.

来源:学生作业帮 编辑:搜搜做题作业网作业帮 分类:数学作业 时间:2024/04/29 02:43:47
用Mathematica解线性方程组.
M = {{1,-2,1,1},{1,-2,1,-1},{1,-2,1,-1}};
b = {1,-5,-5};
LinearSolve[M,b]
{-2,0,0,3}
NullSpace[M]
{{-1,0,1,0},{2,1,0,0}}
x = c %[[1]] = %%
Set::write:Tag Times in -2 c is Protected.>>
{1,-5,-5}
结果总是不对啊.
用Mathematica解线性方程组.
LinearSolve[M,b]
{-2,0,0,3}
应该就是这样