MATLAB: How to solve system of equation in Matlab

equationMATLAB

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.

Best Answer

Or numerically,
null([1 1 2; 2 1 -1])