MATLAB Answers

solving systems of equations but returns empty solutions

2 views (last 30 days)
Nicky
Nicky on 21 Jul 2020
Hi, I am using solve in MATLAB to solve a system of equations where the code is given below and the right hand sides of each equation are actually given numerical values. I wonder why there is empty solutions in sol even there is no error occurred? Thank you for your kind help.
syms x1 x2 x3 y1 y2 y3 z1 z2 z3 u1 u2 u3 v1 v2 v3
eqns = [x1 + y1 + z1 + u1 + v1 == 5*E_e(1,1),...
x2 + y2 + z2 + u2 + v2 == 5*E_e(2,1),...
x3 + y3 + z3 + u3 + v3 == 5*E_e(3,1),...
x1*x1 + y1*y1 + z1*z1 + u1*u1 + v1*v1 == 5*E_ee(1,1),...
x1*x2 + y1*y2 + z1*z2 + u1*u2 + v1*v2 == 5*E_ee(1,2),...
x1*x3 + y1*y3 + z1*z3 + u1*u3 + v1*v3 == 5*E_ee(1,3),...
x2*x2 + y2*y2 + z2*z2 + u2*u2 + v2*v2 == 5*E_ee(2,2),...
x2*x3 + y2*y3 + z2*z3 + u2*u3 + v2*v3 == 5*E_ee(2,3),...
x3*x3 + y3*y3 + z3*z3 + u3*u3 + v3*v3 == 5*E_ee(3,3)];
vars = [x1,x2,x3,y1,y2,y3,z1,z2,z3];
sol = solve(eqns,vars);

  0 Comments

Sign in to comment.

Answers (0)

Products


Release

R2015b

Community Treasure Hunt

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

Start Hunting!