Compute bit or symbol error rate of input data
The ErrorRate
object compares input data from
a transmitter with input data from a receiver and calculates the error
rate as a running statistic. To obtain the error rate, the object
divides the total number of unequal pairs of data elements by the
total number of input data elements from one source.
To obtain the error rate:
Define and set up your error rate object. See Construction.
Call step
to compare input data
from a transmitter with input data from a receiver and calculate the
error rate according to the properties of comm.ErrorRate
.
The behavior of step
is specific to each object in
the toolbox.
Note
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.
H = comm.ErrorRate
creates an error rate
calculator System object, H
. This object computes
the error rate of the received data by comparing it to the transmitted
data.
H = comm.ErrorRate(
creates
an error rate calculator object, Name
,Value
)H
, with each specified
property set to the specified value. You can specify additional namevalue
pair arguments in any order as (Name1
,Value1
,...,NameN
,ValueN
).

Number of samples to delay transmitted signal Specify the number of samples by which the received data lags
behind the transmitted data. This value must be a real, nonnegative,
doubleprecision, integer scalar. Use this property to align the samples
for comparison in the transmitted and received input data vectors.
Specify the delay in number of samples, regardless of whether the
input is a scalar or a vector. The default is 

Computation delay Specify the number of data samples that the object should ignore
at the beginning of the comparison. This value must be a real, nonnegative,
doubleprecision, integer scalar. Use this property to ignore the
transient behavior of both input signals. The default is 

Samples to consider Specify samples to consider as one of 

Selected samples from frame Specify a scalar or a column vector of doubleprecision, real, positive integers. This value
lists the indices of the elements of the RX frame vector that the object uses when making
comparisons. This property applies when you set the 

Enable error rate reset input Set this property to 
reset  Reset states of error rate calculator object 
step  Compute bit or symbol error rate of input data 
Common to All System Objects  

release  Allow System object property value changes 
This object implements the algorithm, inputs, and outputs described on the Error Rate Calculation block reference page. The object properties correspond to the block parameters, except:
The Output data and Variable name block parameters do not have a corresponding properties. The object always returns the result as an output.
The Stop simulation block parameter does not have a corresponding
property. To implement similar behavior, use the output of the step
method in a while loop, to programmatically stop the simulation.
.
The Computation mode parameter corresponds to the Samples
and CustomSamples
properties.