数学
用matlab如何求解多元一次方程组的全部实数解2x1+3x2+5x3+6x4=89x1+x2+x3+x4=20的全部x1,x2,x3x,x4整数解

2019-05-07

用matlab如何求解多元一次方程组的全部实数解
2x1+3x2+5x3+6x4=89
x1+x2+x3+x4=20
的全部x1,x2,x3x,x4整数解
优质解答
for x1=1:50
for x2=1:50
for x3=1:50
for x4=!:50
if (2*x1+3*x2+5*x3+6*x4==89)&&(x1+x2+x3+x4==20)
[x1 x2 x3 x4]
end
end
end
end
end
for x1=1:50
for x2=1:50
for x3=1:50
for x4=!:50
if (2*x1+3*x2+5*x3+6*x4==89)&&(x1+x2+x3+x4==20)
[x1 x2 x3 x4]
end
end
end
end
end
相关问答