来源:学生作业帮 编辑:神马作文网作业帮 分类:数学作业 时间:2024/11/11 18:24: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}
结果总是不对啊.
LinearSolve[M,b]
{-2,0,0,3}
应该就是这样