Uploaded by Harun Shankar

# MATLAB1 ECN-333

advertisement
```MATLAB ASSSIGNMENT
21116041
G Harun Shankar
O6
syms R
Zo = 50;
B = (800 * pi) / 39;
L = 0.05;
w = 2 * pi * 2 * 10^9;
s = 1i * 4 * pi * 10^(9);
RCE = 80000;
RBE = 520;
C = 10^(-11);
CBE = 10^(-11);
CBC = 10^(-12);
l = 10^(-9);
gm = 0.192;
R1 = complex(0, w * 10^-9);
R2 = R1;
R3 = complex(0, -1/(w * 10^-11));
a = (R / complex(0, w * CBC)) / (R + 1 / (complex(0, w * CBC)));
b = (RBE / complex(0, w * CBE)) / (RBE + 1 / (complex(0, w * CBE)));
h1 = [cos(B * l), complex(0, sin(B * l) * Zo); complex(0, sin(B * l) / Zo), cos(B * L)];
h2 = [((1 / RCE) + (1 / a)) / (1 / a - gm), 1 / (1 / a - gm); ((1 / RCE) + (1 / a)) / (1 / a - gm) / (b) + (((1 /
RCE) + (1 / a)) / (1 / a - gm) - 1) / (a), 1 / (1 / a - gm) * (1 / b + 1 / a)];
h3 = [1 + R1 / R3, R1 + R2 + (R1 * R2) / R3; 1 / R3, 1 + R2 / R3];
abcd = h1 * h2 * h3;
d = abcd(2, 2);
y = -1 / d;
R_val = 200:100:10000;
y_val = subs(y, R, R_val);
figure;
plot(R_val, y_val);
xlabel('R');
ylabel('Current Gain');
title('Current Gain vs. R');
grid on; % Add grid lines to the plot
PLOT:
```