Generate bipolar Barker code
The comm.BarkerCode
System object™ generates a bipolar Barker code. Barker codes have low autocorrelation
properties. The short length and low correlation sidelobes make Barker codes useful for frame
synchronization in digital communications systems. For more information, see Barker Codes.
To generate a Barker code:
Create the comm.BarkerCode
object and set its properties.
Call the object, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates a
bipolar Barker code generator System object to generate a Barker code.barkerCode
= comm.BarkerCode
sets properties using one or more name-value pairs. For example,
barkerCode
= comm.BarkerCode(Name
,Value
)comm.BarkerCode('Length',11,'SamplesPerFrame','11')
configures a
bipolar Barker code generator System object to output a length 11 Barker code in an 11-sample frame. Enclose each
property name in quotes.
For versions earlier than R2016b, use the step
function to run the System object algorithm. The arguments to step
are the
object you created, followed by the arguments shown in this section.
For example, y = step(obj,x)
and y = obj(x)
perform equivalent operations.
outputs a Barker code frame,
as a column vector. If the frame length exceeds the Barker code length, the object fills
the frame by repeating the Barker code.y
= barkerCode
Set the data type of the output with the OutputDataType
property.
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj
, use
this syntax:
release(obj)