Quantcast

Documentation Center

  • Trial Software
  • Product Updates

plotSpectrum

System object: phased.MVDREstimator
Package: phased

Plot spatial spectrum

Syntax

plotSpectrum(H)
plotSpectrum(H,Name,Value)
h = plotSpectrum(___)

Description

plotSpectrum(H) plots the spatial spectrum resulting from the last call of the step method.

plotSpectrum(H,Name,Value) plots the spatial spectrum with additional options specified by one or more Name,Value pair arguments.

h = plotSpectrum(___) returns the line handle in the figure.

Input Arguments

H

Spatial spectrum estimator object.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

'NormalizeResponse'

Set this value to true to plot the normalized spectrum. Set this value to false to plot the spectrum without normalizing it.

Default: false

'Title'

String to use as title of figure.

Default: Empty string

'Unit'

The unit of the plot. Valid values are 'db', 'mag', and 'pow'.

Default: 'db'

Examples

Estimate the DOAs of two signals received by a standard 10-element ULA with element spacing of 1 meter. The antenna operating frequency is 150 MHz. The actual direction of the first signal is 10 degrees in azimuth and 20 degrees in elevation. The direction of the second signal is 60 degrees in azimuth and –5 degrees in elevation.

fs = 8000; t = (0:1/fs:1).';
x1 = cos(2*pi*t*300); x2 = cos(2*pi*t*400);
ha = phased.ULA('NumElements',10,'ElementSpacing',1);
ha.Element.FrequencyRange = [100e6 300e6];
fc = 150e6;
x = collectPlaneWave(ha,[x1 x2],[10 20;60 -5]',fc);
% additive noise
noise = 0.1*(randn(size(x))+1i*randn(size(x)));
% construct MVDR estimator object
hdoa = phased.MVDREstimator('SensorArray',ha,...
    'OperatingFrequency',fc,...
    'DOAOutputPort',true,'NumSignals',2);
% use the MVDREstimator step method to obtain the DOA estimates
[y,doas] = step(hdoa,x+noise);
doas = broadside2az(sort(doas),[20 -5]);
plotSpectrum(hdoa);

Was this topic helpful?