用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}结果总是不对啊.

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/15 12:04:08
用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解线性方程组.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解线性方程组.
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解线性方程组.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}
应该就是这样