Solve formal equation and get the solution with these variables

2 ビュー (過去 30 日間)
fc
fc 2021 年 4 月 16 日
コメント済み: fc 2021 年 4 月 17 日
Hello
I am trying with solve without success
syms ib v1 v2 hie hre hfe hoe
eqns=[i1==-ib-hfe*ib+(v1-v2)*hoe, i2==hfe*ib+(v2-v1)*hoe, ib==-v1/hie, hfb == i2 / i1, v2==0]
s=solve(eqns,hfb)
I want to get the same result of this :

採用された回答

Stephan
Stephan 2021 年 4 月 17 日
syms i1 i2 ib v1 v2 hie hre hfe hoe hfb
eqns(1) = i1==-ib-hfe*ib+(v1-v2)*hoe;
eqns(2) = i2==hfe*ib+(v2-v1)*hoe
%ib==-v1/hie
eqns = subs(eqns,ib,-v1/hie)
%hfb == i2 / i1
eqns = hfb == rhs(eqns(2)) / rhs(eqns(1))
% v2 = 0
eqns = subs(eqns,v2,0)
% simplify
eqns = simplifyFraction(eqns)
% show pretty
pretty(eqns)
  1 件のコメント
fc
fc 2021 年 4 月 17 日
Thank You!
The pretty func is good.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProgramming についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by