Pwelch usage - 2013-UQ-Communication-Systems/public GitHub Wiki
If you are using older than 2013 MATLAB, or just want to customise your spectrum plots, you can get the output of pwelch as follows:
[fxx, f]=pwelch(z, [],[],[], 2.048e6);
plot(f-(mean(f)), fftshift(10*log10(fxx)))
In Octave or MATLAB 2013+ you can use some additional arguments to the standard pwelch function
pwelch(z, [], [], [], 2.048e6, 'shift', 'db'); % Octave pwelch with centred spectrum
pwelch(z, [], [], [], 2.048e6, 'centered', 'db'); % MATLAB 2013+ pwelch with centred spectrum