findClutterSampleIndices
Syntax
Description
[
finds the set of subscripts (I1
,I2
,…,IN
] = findClutterSampleIndices(genclutter
,dim1
,dim2
,…,dimN
=value1
,value2
,…,valueN
)I1
, I2
, …,
IN
) into the multidimensional signal data that correspond to surface
clutter patches genclutter
that were generated in the latest call to
the scenario or platform detect
or
receive
object
functions. The subscripts can be used to extract samples of the surface clutter from a
datacube.
Examples
Generate Clutter Indices for Land Clutter
Create a radar scenario containing a land surface. Use the radarTransceiver
and the clutterGenerator
to create clutter.
scenario = radarScenario; landSurface(scenario); rdr = radarTransceiver; platform(scenario,'Sensors',rdr,'Position',[0 0 1e3]); clutgen = clutterGenerator(scenario,rdr);
Create IQ data samples using the receive
function.
iqsig = receive(scenario);
Use the phased.RangeAngleResponse
System object™ to create the range-angle response at azimuth angles from to degrees along a constant elevation cut at degrees. Obtain the response, the range grid and the azimuth grid.
elcut = -10;
resp = phased.RangeAngleResponse(AngleSpan=[-20 20],ElevationAngle=elcut);
[dataRngAz,rnggrid,azgrid] = resp(iqsig{1}, ...
rdr.Waveform.getMatchedFilter);
Using the findClutterSampleIndices
function, find the indices corresponding to the clutter samples. Use the time2range
function to get the size of the range ambiguity. Set the bin width of the elevation cut to .
rngAmbg = time2range(1/rdr.Waveform.PRF); [subsRng,subsAz] = findClutterSampleIndices(clutgen, ... Range=rnggrid,Azimuth=azgrid,Elevation=elcut, ... ElevationBinWidth=2,UnambiguousRange=rngAmbg);
Convert the clutter indices to linear form for extracting samples from the data matrix.
idxlin = sub2ind([numel(rnggrid),numel(azgrid)],subsRng,subsAz);
Plot a histogram of the power levels.
clutPwrSamps = abs(dataRngAz(idxlin)).^2; nexttile histogram(pow2db(clutPwrSamps)) xlabel('Clutter Power (dBW)') ylabel('Counts')
Create a scatter plot of the clutter power levels showing the distribution of clutter power over range and azimuth.
nexttile scatter(azgrid(subsAz),rnggrid(subsRng),20,clutPwrSamps,'Filled') xlabel('Azimuth (deg)') ylabel('Range (m)') title('Clutter Power (W)') colorbar
Input Arguments
genclutter
— Clutter generator
ClutterGenerator
object
Clutter generator, specified as a clutter generator object ClutterGenerator
.
dim1
— Dimension name
char | string
Dimension names, specified as a char or string. Each dimension can have an assigned name according to the order they are indexed in the data. The dimensions of the data are ordered: Range, Azimuth, Elevation, and, Doppler although all of them may not be used in a specific data set. Dimension names, specified as one or more of the following:
Dimension Name | Units |
Range | meters |
Azimuth | degrees |
Elevation | degrees |
Doppler | Hz |
You can use the permute
and
ipermute
functions to swap the order of dimensions of the
datacube.
Azimuth and elevation are defined with respect to the sensor mounting frame.
Data Types: char
| string
dim2
— Dimension name
char | string
Second dimension name, specified as a char or string.
Data Types: char
| string
dimN
— Dimension name
char | string
Nth dimension name, specified as a char or string.
Data Types: char
| string
value1
— Data values
scalar | real-valued vector
Data values, specified as a scalar or vector. Values specify the domain of the corresponding dimension. The data values are ordered: Range, Azimuth, Elevation and Doppler when used.
Data Types: char
| string
value2
— Data values
scalar | real-valued vector
Second set of data values, specified as a scalar or vector. Values specify the domain of the corresponding dimension. The data values are ordered: Range, Azimuth, Elevation and Doppler when used.
Data Types: char
| string
valueN
— Data values
scalar | real-valued vector
Nth set of data values, specified as a scalar or vector. Values specify the domain of the corresponding dimension. The data values are ordered: Range, Azimuth, Elevation and Doppler when used.
Data Types: char
| string
Name-Value Arguments
Example: RangeBinWidth = 50
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.
RangeBinWidth
— Range bin width
positive scalar
Range bin width, specified as a positive scalar. Specify this Name-Value pair only if the range domain is specified as a scalar. Otherwise, it is ignored. Units are in meters.
Data Types: single
| double
DopplerBinWidth
— Doppler bin width
positive scalar
Doppler bin width, specified as a positive scalar. Specify this Name-Value pair only if the Doppler domain is specified as a scalar. Otherwise, it is ignored. Units are in Hz.
Data Types: single
| double
AzimuthBinWidth
— Azimuth angle bin width
positive scalar
Azimuth angle bin width, specified as a positive scalar. Specify this Name-Value pair only if the Azimuth domain is specified as a scalar. Otherwise, it is ignored. Units are in degrees.
Example: 35
Data Types: single
| double
ElevationBinWidth
— Elevation angle bin width
positive scalar
Elevation angle bin width, specified as a positive scalar. Specify this Name-Value pair only if the Elevation domain is specified as a scalar. Otherwise, it is ignored. Units are in degrees.
Data Types: single
| double
UnambiguousRange
— c
inf
(default) | positive scalar
Maximum unambiguous range, specified as positive scalar. Units are in meters.
Data Types: single
| double
UnambiguousDoppler
— Maximum unambiguous Doppler
inf
(default) | positive scalar
Maximum unambiguous Doppler, specified as a positive scalar. Units are in Hz.
Example: 3.0
Data Types: single
| double
Output Arguments
I1
— Indices of vector subscripts
positive integer-valued vector
First set of indices of vector subscripts, returned as a positive integer-valued
vector. I1
is a vector of subscripts into the first dimension of
the datacube. The indices of the data are ordered: Range, Azimuth, Elevation and Doppler
when used. For example, if the data is only over Azimuth and Doppler,
I1
corresponds to Azimuth and I2
corresponds
to Doppler. You can use permute
and ipermute
functions to swap dimensions of an array as needed.
I2
— Indices of vector subscripts
positive integer-valued vector
Second set of Indices of vector subscripts, returned as a positive integer-valued
vector. I2
is a vector of subscripts into the second dimension of
the datacube. The indices of the data are ordered: Range, Azimuth, Elevation and Doppler
when they are used. For example, if the data is only over Azimuth and Doppler,
I2
corresponds to Doppler dimension. You can use
permute
and ipermute
functions to swap
dimensions of an array as needed.
IN
— Indices of vector subscripts
positive integer-valued vector
Nth set of indices of vector subscripts, returned as a
positive integer-valued vector. IN
is a vector of subscripts into
the N
th dimension of the datacube. The
indices of the data are ordered: Range, Azimuth, Elevation and Doppler when they are
used. You can use permute
and ipermute
functions to swap dimensions of an array as needed.
Version History
Introduced in R2023b
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)