Empty sym: 0-by-1.

2 次查看(过去 30 天)
Talal Salem
Talal Salem 2020-3-3
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

回答(1 个)

Walter Roberson
Walter Roberson 2020-3-3
>> 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.

类别

Help CenterFile Exchange 中查找有关 Assumptions 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by