Main Content


System object: comm.PreambleDetector
Package: comm

Detect preamble in data


idx = step(prbdet,x)
[idx,detmet] = step(prbdet,x)
idx = prbdet(x)
[idx,detmet] = prbdet(x)



Starting in R2016b, instead of using the step method to perform the operation defined by the System object™, you can call the object with arguments, as if it were a function. For example, y = step(obj,x) and y = obj(x) perform equivalent operations.

idx = step(prbdet,x) returns the location of the end of the preamble in data sequence x, using preamble detector prbdet. The index is of data type double.

[idx,detmet] = step(prbdet,x) also returns the detection metric, detmet. This syntax is available when the Input property is 'Symbol'. detmet has the same dimensions and data type as x.

The output, detmet, is determined by one of these algorithms:

  • If either the preamble or input data is complex, the detection metric is the absolute value of the cross-correlation of the preamble and the input signal.

  • If both the preamble and input data are real, the detection metric is the cross-correlation of the preamble and the input signal.

idx = prbdet(x) is equivalent to the first syntax.

[idx,detmet] = prbdet(x) is equivalent to the second syntax.


prbdet specifies the System object on which to run this step method.

The object performs an initialization the first time the step method is executed. This initialization locks nontunable properties and input specifications, such as dimensions, complexity, and data type of the input data. If you change a nontunable property or an input specification, the System object issues an error. To change nontunable properties or inputs, you must first call the release method to unlock the object.

Version History

Introduced in R2016b