Empty sym: 0-by-1.

1 回表示 (過去 30 日間)
Talal Salem
Talal Salem 2020 年 3 月 3 日
コメント済み: Talal Salem 2020 年 3 月 5 日
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 件のコメント
Talal Salem
Talal Salem 2020 年 3 月 5 日
Thank you

サインインしてコメントする。

回答 (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 Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by