A = 2e5;
R1 = 5e3;
R2 = 7e3;
r0 = 75;
vin = 1;

RLvec = logspace(1, 6, 50);

vLvec = vin * (R1/(R1+R2) + 1/A*(1 + r0/(R1+R2) + r0./RLvec)).^(-1);
iLvec = vLvec ./ RLvec;

[p,s] = polyfit(iLvec, vLvec, 1);

figure(1)
clf
plot(iLvec, vLvec, 'b.-')
xlabel('i_L (A)')
ylabel('v_L (V)')
title('THEVENIN MODEL FOR NONINVERTING AMP')
grid
