I am trying to plot frequency spectra with 95% confidence intervals (upper and lower bounds). I am using pwelch to calculate power spectra then plotting using loglog. But so far I can only figure out how to plot the confidence intervals at line. I would like to shade the intervals instead. I think I could do so by shading between the power line and the confidence interval lines. Any ideas? This is my current code and I have attached a figure.
clear PxxU F PxxC; [PxxU,F,PxxC] = pwelch(detrend(fixgaps(PK1.zavg_pE(j,pkperiod))),,,nfft,288);
legend('PK','PK upper','PK lower','location','southwest')