Frequency and power content using eigenvector method
estimates the frequency content in the input signal
pow] = rooteig(
x and returns
w, a vector of frequencies in rad/sample, and the corresponding
signal power in the vector
pow. You can specify the signal subspace
dimension using the input argument
The extra threshold parameter in the second entry in
p provides you
more flexibility and control in assigning the noise and signal subspaces.
forces the input argument
pow] = rooteig(___,
x to be interpreted as a correlation matrix
rather than matrix of signal data. For this syntax,
x must be a square
matrix, and all of its eigenvalues must be nonnegative. This syntax can include the input
arguments from the previous syntax.
You can place
'corr' anywhere after
Frequency Content of Complex Exponentials
Find the frequency content in a signal composed of three complex exponentials in noise. Use the modified covariance method to estimate the correlation matrix used by the eigenvector method. Reset the random number generator for reproducible results.
rng default n = 0:99; s = exp(1i*pi/2*n)+2*exp(1i*pi/4*n)+exp(1i*pi/3*n)+randn(1,100); X = corrmtx(s,12,'mod'); [W,P] = rooteig(X,3)
W = 3×1
P = 3×1
x — Input signal
vector | matrix
Input signal, specified as a vector or matrix. If
x is a
vector, then it is treated as one observation of the signal. If
is a matrix, each row of
x represents a separate observation of the
signal. For example, each row is one output of an array of sensors, as in array
processing, such that
x'*x is an estimate of the correlation
You can use the output of
corrmtx to generate such an array
Complex Number Support: Yes
p — Subspace dimension
real positive integer | two-element vector
Subspace dimension, specified as a real positive integer or a two-element vector. If
p is a real positive integer, then it is treated as the subspace
p is a two-element vector, the second element of
p represents a threshold that is multiplied by λmin, the smallest estimated eigenvalue of the signal's correlation matrix.
Eigenvalues below the threshold λmin*
p(2) are assigned to the noise subspace. In this case,
p(1) specifies the maximum dimension of the signal subspace. The extra
threshold parameter in the second entry in
p provides you more
flexibility and control in assigning the noise and signal subspaces.
fs — Sample rate
1 (default) | positive scalar | 
Sample rate, specified as a positive scalar. You can supply the sample rate
fsin Hz. If you specify
fs as the empty vector
, the sample rate defaults to
w — Output frequencies in rad/sample
Output frequencies in rad/sample, returned as a vector. The length of the vector
w is the computed dimension of the signal subspace.
pow — Signal power
Signal power, returned as a vector.
f — Output frequencies in Hz
Output frequencies in Hz, returned as a vector. You supply the sampling frequency
fs in Hz. If you specify
fs with the empty
vector , the sampling frequency defaults to
The eigenvector method used by
rooteig is the same as that used by
peig. The algorithm performs eigenspace analysis of the signal's correlation
matrix to estimate the signal's frequency content.
The difference between
peigreturns the pseudospectrum at all frequency samples.
rooteigreturns the estimated discrete frequency spectrum, along with the corresponding signal power estimates.
rooteig is most useful for frequency estimation of signals made up of a
sum of sinusoids embedded in additive white Gaussian noise.
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Usage notes and limitations:
Generated code might return outputs in a different sorted order compared to MATLAB®.
Introduced before R2006a