Solve formal equation and get the solution with these variables

2 Ansichten (letzte 30 Tage)
fc
fc am 16 Apr. 2021
Kommentiert: fc am 17 Apr. 2021
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 :

Akzeptierte Antwort

Stephan
Stephan am 17 Apr. 2021
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)

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by