Symbolsk løsning av nodeligninger med Matlab: Difference between revisions
From ift
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
% Using Kirchoff's current law (KCL) on a source follower configuration | % Using Kirchoff's current law (KCL) on a source follower configuration | ||
% to find Vout as a function of Vin | % to find Vout as a function of Vin | ||
% Only Cgd is considered (Zc) | |||
% Kjetil Ullaland | % Kjetil Ullaland | ||
Revision as of 08:17, 9 September 2014
% 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))