PB=readtable('monthly_flask_co2_ptb.csv');
PBt=table2array(PBdailyt);
PBCO2=table2array(PBdailyCO2);
idx = PBCO2 >=450 | PBCO2 <=300 ;
This is my code so far, I am now looking to extract the seasonal cycle. The two different codes I have tried(below) has been unsuccessful. Is there another way I can go about removing the seasonal cycle?
PBCO2_mean(k) = mean(PBCO2(mo==k),'omitnan');
PBCO2_deseasoned(mo==k) = PBCO2(mo==k) - PBCO2_mean(k);
and
PBCO2_mean(i)=mean(PBCO2(idx),'omitnan');
PBCO2_deseasoned=ones(636,1);
PBCO2_deseasoned(mo==i)=PBCO2(mo==i)-PBCO2_s(i);