Empty sym: 0-by-1.

2 visualizaciones (últimos 30 días)
Talal Salem
Talal Salem el 3 de Mzo. de 2020
Comentada: Talal Salem el 5 de Mzo. de 2020
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

Respuestas (1)

Walter Roberson
Walter Roberson el 3 de Mzo. de 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.

Community Treasure Hunt

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

Start Hunting!

Translated by