%% pmusic with No Sampling Specified
% This example analyzes a signal vector, x, assuming that two real sinusoidal components are present in the signal subspace. In this case, the dimension of the signal subspace is 4, because each real sinusoid is the sum of two complex exponentials.

n = 0:199;
x = cos(0.257*pi*n) + sin(0.2*pi*n) + 0.01*randn(size(n));
pmusic(x,4)      % Set p to 4 because there are two real inputs

% Copyright 2015 The MathWorks, Inc.