Empty sym: 0-by-1.

조회 수: 23 (최근 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 CenterFile Exchange에서 Assumptions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by