Empty sym: 0-by-1, Why this error occur in this code????
34 views (last 30 days)
Show older comments
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 Comments
Ameer Hamza
on 4 Oct 2020
Edited: Ameer Hamza
on 4 Oct 2020
It means that such a solution might not exist or cannot be represented analytically.
Answers (1)
Walter Roberson
on 5 Oct 2020
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]
0 Comments
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!