Main Content

plotSpectrum

Plot spatial spectrum

Description

plotSpectrum(estimator) plots the spatial spectrum resulting from the most recent execution of the object.

plotSpectrum(estimator,Name=Value) plots the spatial spectrum with additional options specified by one or more name-value arguments.

example

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

Examples

collapse all

First, 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° in azimuth and 20° in elevation. The direction of the second signal is 60° in azimuth and −5° in elevation. Then, plot the MVDR spatial spectrum.

Create the signals with added noise. Then, create the ULA System object™.

fs = 8000;
t = (0:1/fs:1).';
x1 = cos(2*pi*t*300);
x2 = cos(2*pi*t*400);
array = phased.ULA(NumElements=10,ElementSpacing=1);
array.Element.FrequencyRange = [100e6 300e6];
fc = 150.0e6;
x = collectPlaneWave(array,[x1 x2],[10 20;60 -5]',fc);
noise = 0.1*(randn(size(x)) + 1i*randn(size(x)));

Create an MVDR estimator System object.

estimator = phased.MVDREstimator(SensorArray=array,...
    OperatingFrequency=fc,DOAOutputPort=true,NumSignals=2);

Estimate the DOAs.

[y,doas] = estimator(x + noise);
doas = broadside2az(sort(doas),[20 -5])
doas = 1×2

    9.5829   60.3813

Plot the spectrum.

plotSpectrum(estimator)

Figure contains an axes object. The axes object with title MVDR Spatial Spectrum, xlabel Broadside Angle (degrees), ylabel Power (dB) contains an object of type line. This object represents 1 GHz.

Input Arguments

collapse all

Spatial spectrum estimator object, specified as a phased.MVDREstimator object.

Name-Value Arguments

collapse all

Specify optional pairs of arguments as Name1=Value1,...,NameN=ValueN, where Name is the argument name and Value is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Example: plotSpectrum(estimator,NormalizeResponse=0) plots the spectrum without normalization.

Before R2021a, use commas to separate each name and value, and enclose Name in quotes.

Spectrum normalization, specified as true (logical 1) or false (logical 0). Setting this value to false plots the spectrum without normalization.

Figure title, specified as a character vector or string scalar.

Data Types: char | string

Plot units, specified as "db", "mag", or "pow".

Data Types: char | string

Version History

Introduced in R2011a