How to solve system of equation in Matlab ?

1 次查看(过去 30 天)
How to solve the system of equations that the number of variable is fewer than the number of equations. for example:
x + y + 2z = 0,
2x + y -z = 0.
the result is
x = 3t,
y=-5t,
z=t.(t is parameter)
thanks you very much.

采纳的回答

Matt J
Matt J 2014-1-3
Or numerically,
null([1 1 2; 2 1 -1])

更多回答(1 个)

Azzi Abdelmalek
Azzi Abdelmalek 2014-1-3
sol=solve('x + y + 2*z = 0','2*x + y -z = 0','x','y')
x=sol.x
y=sol.y

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by