%% Progrma to calculte the gain and input resistance of a cascode %% amplifier. Executing this program requires Symbolic Analysis toolbox. %% The program makes use of node analysis. clear all clc syms gm1 gm2 ro1 ro2 gmb2 Rd Vin M=[1/ro2+1/Rd,-gm2-gmb2-1/ro2;-1/ro2,gm2+gmb2+1/ro1+1/ro2]; % Matrix N=[0;-gm1]; % Vector X=inv(M)*N; fprintf('Amplifier Gain: \n') Gain=simplify(X(1)); pretty(Gain)