Main Content

findClutterSampleIndices

Clutter sample indices

Since R2023b

    Description

    [I1,I2,…,IN] = findClutterSampleIndices(genclutter,dim1,dim2,…,dimN=value1,value2,…,valueN) finds the set of subscripts (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.

    [I1,I2,…,IN] = findClutterSampleIndices(genclutter,dim1,dim2,…,dimN=value1,value2,…,valueN,Name=Value) specifies additional Name-Value pair arguments.

    example

    Examples

    collapse all

    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 -20 to 20 degrees along a constant elevation cut at -10 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 2.

    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

    Figure contains 2 axes objects. Axes object 1 with xlabel Clutter Power (dBW), ylabel Counts contains an object of type histogram. Axes object 2 with title Clutter Power (W), xlabel Azimuth (deg), ylabel Range (m) contains an object of type scatter.

    Input Arguments

    collapse all

    Clutter generator, specified as a clutter generator object ClutterGenerator.

    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 NameUnits
    Rangemeters
    Azimuthdegrees
    Elevationdegrees
    DopplerHz

    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

    Second dimension name, specified as a char or string.

    Data Types: char | string

    Nth dimension name, specified as a char or string.

    Data Types: char | string

    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

    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

    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.

    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

    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

    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

    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

    Maximum unambiguous range, specified as positive scalar. Units are in meters.

    Data Types: single | double

    Maximum unambiguous Doppler, specified as a positive scalar. Units are in Hz.

    Example: 3.0

    Data Types: single | double

    Output Arguments

    collapse all

    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.

    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.

    Nth set of indices of vector subscripts, returned as a positive integer-valued vector. IN is a vector of subscripts into the Nth 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