System object: phased.BeamscanEstimator
Package: phased

Plot spatial spectrum


h = plotSpectrum(___)


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


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.


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

Default: false


String to use as title of figure.

Default: Empty string


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

Default: 'db'

Estimate Directions of Arrival of Two Signals

Create the signals and solve for the DOA's

Estimate the DOA's of two signals received by a 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);
noise = 0.1*(randn(size(x))+1i*randn(size(x)));
hdoa = phased.BeamscanEstimator('SensorArray',ha,...
[y,doas] = step(hdoa,x+noise);
doas = broadside2az(sort(doas),[20 -5])
doas =

    9.5829   60.3813

Plot the beamscan spectrum


Was this topic helpful?