MATLAB: How to solve this system of equations for real number

syms

syms x y z
eqn1= x+y+z== 16;
eqn2= x*y+y*z+z*x ==41.75;
eqn3= x*y*z== -178;
S = solve(eqn1,x,'Real',true);
H = solve(eqn2,y,'Real',true);
F = solve(eqn3,z,'Real',true);
I want to solve for x, y, z as real numbers but idk how this is just giving me it with the other variables.

Best Answer

You have not assigned numeric values to ‘x’, ‘y’, and ‘z’, so what you currently have is the best you can do.