% MSE 2022
% Extended Figure 1
% FE-EPR paper

close
clear, clc, clf 

%% Load Excel Sheet

filename = {'FE-EPR_05_5mVps',...
              'FE-EPR_04_25mVps',...
              'FE-EPR_03_50mVps',...
              'FE-EPR_02_75mVps',...
              'FE-EPR_01_100mVps'};

% Read out raw data
for n = 1:length(filename)
    raw{n} = readtable(filename{1,n},'HeaderLines',1); % read the complete .txt file without the header
    scan{n}  =  raw{1,n}{:,5};
    we_pot{n} = raw{1,n}{:,6}; % potential of working electrode in V
    current{n} = raw{1,n}{:,4}; % measured current in A
end

figure(1)
% subplot(1,2,1)
box on
hold on
for n = 1:length(filename)
    plot(we_pot{n}+0.211,current{n}*1e6,'linewidth',2.0) 
end

axis tight

xlabel('Potential (V vs SHE)');
% xlim([0.4 1.2]);
set(gca,'XMinorTick','on', 'fontsize',18,'FontName','Arial');
ylabel('Current (µA)','fontsize',18,'FontName','Arial');
legend('5  mV/s','25 mV/s','50  mV/s','75 mV/s','100 mV/s','FontName','Arial');