Empty sym: 0-by-1, Why this error occur in this code????

조회 수: 27 (최근 30일)
je heo
je heo 2020년 10월 4일
답변: Walter Roberson 2020년 10월 5일
syms Z1 Z2 Z3 Za Zb Zc
% there are 6 variable, 3 equation
% then we get only three relation with 6 variable
eqn1 = Z1+Z3 ==(Za+Zc)*(Za+Zb+Zc)/(Za+Zc+Za+Zb+Zc);
eqn2 = Z2 == (2*Za+Zb+Zc)*Zc/(2*Za+Zb+Zc+Zc);
eqn3 = Z1+Z2+Z3 == (Za+Zb)*(Za+2*Zc)/(Za+Zb+Za+2*Zc);
eqn = [eqn1 eqn2 eqn3];
[Za Zb Zc] = solve(eqn, [Za Zb Zc]);
simplify(Za); simplify(Zb); simplify(Zc);
I dont know that the error message, Empty sym: 0-by-1 occur in this code.
I solved 3 eqn included in 6 vars
I want to get Za, Zb, Zc related with Z1,Z2,Z3.
  댓글 수: 2
Ameer Hamza
Ameer Hamza 2020년 10월 4일
편집: Ameer Hamza 2020년 10월 4일
It means that such a solution might not exist or cannot be represented analytically.
je heo
je heo 2020년 10월 5일
Thank you for your answer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2020년 10월 5일
It turns out that you need to use limits to get the solution, which is
Za = Z1 - Z2 + Z3
Zb = infinity
Zc = Z2
Unfortunately, MATLAB cannot process the limit with respect to Zb = infinity. The result of the limit is
[Z1 + Z3 == Za + Zc, Z2 == Zc, Z1 + Z2 + Z3 == Za + 2*Zc]

카테고리

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