% filename = '100_-5to5_sd500m_lightoff_n2off_b.txt';
% filename2 = '100nosint_-5to5_sd500m_lightoff_n2off.txt';

% filename = '100_5to-5_sd500m_lightoff_n2off.txt';
% filename2 = '100nosint_5to-5_sd500m_lightoff_n2off.txt';

% filename = '500_-5to5.txt';
% filename2 = '500nosint_-5to5_sd3m_lightoff_n2off.txt';

filename = '500_5to-5_sd500m.txt';
filename2 = '500nosint_5to-5_sd500m_lightoff_n2off.txt';

figure;
hold off;
%subplot(224);

dimension1 = str2double(filename(1:3));
dimension2 = str2double(filename(1:3));
A1 = (dimension1*1e-4)^2; % in cm^2
A2 = (dimension2*1e-4)^2;

%hold off;
% Format: V, C, G
data = load(filename);
data2 = load(filename2);

scale = 1e9;
data(:,2) = data(:,2)/A1*scale;
data2(:,2) = data2(:,2)/A2*scale;

plot(data(:,1),data(:,2),'linewidth',1); hold on;
plot(data2(:,1),data2(:,2),'r','linewidth',1); hold on;

plot(data(:,1),data(:,2),'o','markersize',2);
plot(data2(:,1),data2(:,2),'ro','markersize',2);

xlabel('Bias voltage (V)','fontsize',14);
ylabel('Capacitance per area (nF/cm^2)','fontsize',14);
grid on;
set(0,'defaulttextinterpreter','none');
title([filename ' vs.' filename2]);
set(0,'defaulttextinterpreter','tex');