Symbolsk løsning av nodeligninger med Matlab
From ift
% Using Kirchoff's current law (KCL) on a source follower configuration % to find Vout as a function of Vin % Only Cgd is considered (Zc) % Kjetil Ullaland ligning1='(Vout-Vgs)/Zc+gm*Vgs+Vout/Rl=0'; ligning2='(Vgs-Vout)/Zc+(Vgs-Vin)/Rs=0'; ligning1=subs(ligning1,'1/(j*w*C)','Zc'); ligning2=subs(ligning2,'1/(j*w*C)','Zc'); pretty(ligning1); pretty(ligning2); disp('Solve for Vgs'); vgs_solved=solve(ligning2,'Vgs'); pretty(simplify(vgs_solved)); disp('Solve for Vout(vin)'); ligning3=subs(ligning1,vgs_solved,'Vgs'); Vout_solved=solve(ligning3,'Vout'); pretty(simplify(Vout_solved))