fh = plot(clusterer,X,idx)
displays a plot of DBSCAN clustering results and returns a figure handle,
fh. Inputs are the cluster object, clusterer,
the input data matrix, X, and cluster indices,
idx.

fh = plot(___,'Parent',ax)
also specifies the axes, ax, of the cluster results plot.

fh = plot(___,'Title',titlestr)
also specifies the title, titlestr, of the cluster results plot.

Create detections of extended objects with measurements in range and Doppler. Assume the maximum unambiguous range is 20 m and the unambiguous Doppler span extends from $-30$ Hz to $30$ Hz. Data for this example is contained in the dataClusterDBSCAN.mat file. The first column of the data matrix represents range, and the second column represents Doppler.

The input data contains the following extended targets and false alarms:

an unambiguous target located at $\left(10,15\right)$

an ambiguous target in Doppler located at$\left(10,-30\right)$

an ambiguous target in range located at $\left(20,15\right)$

an ambiguous target in range and Doppler located at $\left(20,30\right)$

5 false alarms

Create a clusterDBSCAN object and specify that disambiguation is not performed by setting EnableDisambiguation to false. Solve for the cluster indices.

Use the clusterDBSCANplot object function to display the clusters.

plot(cluster1,x,idx)

The plot indicates that there are eight apparent clusters and six noise points. The 'Dimension 1' label corresponds to range and the 'Dimension 2' label corresponds to Doppler.

Next, create another clusterDBSCAN object and set EnableDisambiguation to true to specify that clustering is performed across the range and Doppler ambiguity boundaries.

Perform the clustering using ambiguity limits and then plot the clustering results. The DBSCAN clustering results correctly show four clusters and five noise points. For example, the points at ranges close to zero are clustered with points near 20 m because the maximum unambiguous range is 20 m.

Clusterer object, specified as a clusterDBSCAN object.

X — Input data to cluster real-valued N-by-P matrix

Input data, specified as a real-valued N-by-P
matrix. The N rows correspond to points in a
P-dimensional feature space. The P columns contain
the values of the features over which clustering takes place. For example, a two-column
input can contain Cartesian coordinates x and y,
or range and Doppler.

Data Types: double

idx — Cluster indices N-by-1 integer-valued column vector

Cluster indices, specified as an N-by-1 integer-valued column
vector. Cluster indices represent the clustering results of the DBSCAN algorithm
contained in the first output argument of clusterDBSCAN.
idx values start at one and are consecutively numbered. The plot
object function labels each cluster with the cluster index. A value of –1 in
idx indicates a DBSCAN noise point. Noise points are not
labeled.

Data Types: double

ax — Axes of plot Axes handle

Axes of plot, specified as an Axes object handle.

Data Types: double

titlestr — Plot title character vector | string

Plot title, specified as a character vector or string.

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.