Empty sym: 0-by-1.
2 views (last 30 days)
Show older comments
Hi,
I'm trying to solve these four linear equation.
clear all;
clc;
syms a b c d e f g h z k l m n o p q v y
eqn1 = a == y*(b*c+d*e+f*g+h*z);
eqn2 = k == y*(d*c+l*e+m*g+n*z);
eqn3 = o == y*(n*c+f*e+p*g+q*z);
eqn4 = v == y*(n*c+f*e+p*g+q*z);
sol = solve([eqn1, eqn2, eqn3, eqn4], [c, e, g, z]);
cSol = sol.c
eSol = sol.e
gSol = sol.g
zSol = sol.z
When it's run I got the solution as
Empty sym: 0-by-1.
Could you help me in figuring out this issue?
Thanks in advance
Answers (1)
Walter Roberson
on 3 Mar 2020
>> sol1 = solve([eqn1,eqn2,eqn3],[c,e,g])
sol1 =
struct with fields:
c: [1×1 sym]
e: [1×1 sym]
g: [1×1 sym]
>> simplify(subs(eqn4,sol1))
ans =
v == o
Your equations are not independent; you cannot solve for all four of those particular variables at the same time.
0 Comments
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!