Using matlab to solve system of algebraic equations, got no answers

1k Views Asked by At

I used the following matlab code to solve a system of algebraic equations, but I got no answer.

clear; clc; close all;

syms x y z u

eqns = [2x + 1 == 2ux, 4y == 2uy, 6z == 2u*z, x^2 + y^2 +z^2 == 1];

S = solve(eqns,[x y z u]);

S.u

the result says:

ans =

Empty sym: 0-by-1

But there should be answers, to see the answers, please refer to an MIT calculus course: https://www.youtube.com/watch?v=nDuS5uQ7-lo&list=PLkcAPvx7T8bBOOuDcxZE_sdTchjQcTyM-&index=29

So , what is wrong?