load CO2.txt
figure
time = CO2(:,1);
CO2 = CO2(:,2);
interptime = time(1):abs(mean(diff(time))):time(end);
interpCO2 = interp1(time,CO2,interptime);

subplot(1,2,1)
plot(time,CO2,interptime,interpCO2,'+');
title('CO2 vs. time to check interpolation')

[f,P,Pred_norm,Pwhite_norm,P95,P95chi2]=myspectrum(interptime,interpCO2);
subplot(1,2,2);
loglog(f,P,'k'); hold on;
loglog(f,Pred_norm,'r');
loglog(f,P95);
title('CO2 Spectrum')


