If you are lucky, afterwards coordscell will only have 1 x 2 entries, a single X and Y pair. If not, then you will have to figure out -which- of the lines is the relevant one for your purposes. *Usually* lines that Matlab draws for background purposes (e.g., grid lines) will be hidden objects, but not always.
I can't show you the process from start to finish or test this in advance as psd() does not take simple waveforms and produce a plot; it takes a spectrum object class as input and returns something in a different class that has to be plotted by some other function (but I couldn't immediately see what the actual plot routine was.)
-- Q = quotation(rand); if isempty(Q); error('Quotation server filesystem problems') else sprintf('%s',Q), end