load emissions.csv
y = emissions(end-113:end, 1);
e = cumsum(emissions(end-113:end, 2)/1000);    % Sum annual emissions, convert MtC to Gtc

load pa.csv
c = pa(end-114:end-1, 2);

% Trend line
tp = polyfit(e, c, 1)';
trend = [e.^1 e.^0]*tp;

figure(2); clf
plot(e, [c trend])
xlabel('Accumulated fossil fuel emissions 1900-2013 (GtC)   Source: CDIAC')
ylabel('Atmospheric CO2 (ppmv)  Sources: PA, Mauna Loa')
title('Dependence of CO2 on Emitted Fossil Fuel: 1900-2013')
legend('Atmos CO2:Emissions', sprintf('Trend, R2 = %.2f%%', ...
    (1-var(trend-c)/var(c))*100), 'Location', 'NorthWest');