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

$\begingroup$

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:

So , what is wrong?

$\endgroup$ 4 Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like