%% Store and Plot Pseudospectrum Data
% Use eigenanalysis to estimate the pseudospectrum of a noisy sinusoidal signal with two frequency components.

Fs = 32e3;
t  = 0:1/Fs:2.96; 
x = cos(2*pi*t*1.24e3) + cos(2*pi*t*10e3) + randn(size(t));
P = pmusic(x,4);

%
% Create a pseudospectrum data object to store the results. Plot the pseudospectrum.

hps = dspdata.pseudospectrum(P,'Fs',Fs); 

plot(hps)

% Copyright 2012 The MathWorks, Inc.