필터 지우기
필터 지우기

solve() gives Empty sym: 0-by-1

조회 수: 3 (최근 30일)
Serdar Ünal
Serdar Ünal 2020년 11월 12일
댓글: Ameer Hamza 2020년 11월 12일
syms Vx Vin Vs Io Vy Vo L C R Rp k s
eqn1 = ((Vx-Vin)/Rp) + ((Vx-Vs)/R) - (k*Io/2) + ((Vx-Vy)/((2*s*L)+(1/(s*C)))) == 0;
eqn2 = (Vy/Rp) + ((Vy-Vs)/R) - (k*Io/2) + ((Vy-Vx)/((2*s*L)+(1/(s*C)))) == 0;
eqn3 = (Vo*s*C) == ((Vx-Vy)/((2*s*L)+(1/(s*C))));
% sol = solve([eqn1, eqn2, eqn3, eqn4], [Vx, Vin, Vs, Io, Vy, Vz, Vo, L, C, R, Rp, k, s]);
sol = solve([eqn1, eqn2, eqn3], [Vo]);
sol
% sol.Vx
syms x y z c
eqn1 = 2*x + y + z == 2;
sol = solve([eqn1], [x]);
sol
I try to obtain transfer function of a circuit but I get empty sym. I have three equations with many more variables, so I expect symbolic solutions. Second part of the code is an example for me to see whether I can obtain such answer for different case, I get what I needed in this case. Outputs are below
sol =
Empty sym: 0-by-1
sol =
1 - z/2 - y/2
Can you help me?

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 11월 12일
편집: Ameer Hamza 2020년 11월 12일
Why not just solve eqn3, it is enough to give expression of Vo
sol = solve(eqn3, Vo);
Result
>> sol
sol =
(Vx - Vy)/(2*C*L*s^2 + 1)
If you want to eliminate Vx and Vy from the solution then try this
sol = solve([eqn1, eqn2, eqn3], [Vo Vx Vy]);
Result
>> sol.Vo
ans =
(R*Vin)/(R + Rp + 2*C*L*R*s^2 + 2*C*L*Rp*s^2 + 2*C*R*Rp*s)
Also find the transfer function
>> sol.Vo/Vin
ans =
R/(R + Rp + 2*C*L*R*s^2 + 2*C*L*Rp*s^2 + 2*C*R*Rp*s)
  댓글 수: 2
Serdar Ünal
Serdar Ünal 2020년 11월 12일
Thanks for the quick answer :)
Ameer Hamza
Ameer Hamza 2020년 11월 12일
I am glad to be of help! :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Equation Solving에 대해 자세히 알아보기

태그

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by