[Oc,Foc]=psd2(detrend(rc),12000);
[Oh,Foh]=psd2(detrend(oakH2O),12000);
[Lh,Flh]=psd2(detrend(LicorH2O),12000);
[Lc,Flc]=psd2(detrend(LicorCO2),12000);

[Lhs,Flhs]=specsmoo(Lh,20);
[Lcs,Flcs]=specsmoo(Lc,20);
[Ohs,Fohs]=specsmoo(Oh,20);
[Ocs,Focs]=specsmoo(Oc,20);

subplot(2,1,1);loglog(Flhs,Flhs.*Lhs,'k--',Fohs,Fohs.*Ohs,'k',Fohs(25:54),6.*(Fohs(25:54).^(-2/3))./(Fohs(40).^(-2/3)).*Ohs(40),'k:','Linewidth',2);axis([1e-3 10 1e-10 1e-6]);set(gca,'LineWidth',2,'FontSize',16);ylabel('H2O PSD*F');text(1,8e-8,'-2/3','FontSize',16);
subplot(2,1,2);loglog(Flcs,Flcs.*Lcs,'k--',Focs,Focs.*Ocs,'k',Focs(25:54),4.*(Focs(25:54).^(-2/3))./(Focs(40).^(-2/3)).*Ocs(40),'k:','Linewidth',2);axis([1e-3 10 1e-14 1e-10]);set(gca,'LineWidth',2,'FontSize',16);xlabel('Frequency in Hz');ylabel('CO2 PSD*F');text(1,1.6e-11,'-2/3','FontSize',16);
