close all

Rsample = 300000:1000:400000;
Rshunt = 350000;
Radc = 10*10^9;
Vexc = .1;

figure
for i=1:10
    Rs(i) = Rshunt / (.2*i); 
    Req = (Rs(i) * Radc) / (Rs(i) + Radc);
    Vmeas(i,:)  = Vexc .* ( Req ./ (Req + Rsample));
    deltaV(i) = Vmeas(i,1) - Vmeas(i,end);
    plot(Rsample,Vmeas)
    hold on;
end
hold off
figure1 = figure;
axes1 = axes('Parent',figure1,'YGrid','on',...
    'XTick',[0 100000 200000 300000 400000 500000 600000 700000 800000 900000 1000000 1100000 1200000 1300000 1400000 1500000 1600000 1700000 1800000],...
    'XMinorTick','on',...
    'XGrid','on');
box(axes1,'on');
hold(axes1,'all');

plot(Rs,deltaV)



