Baseband File Reader
Read baseband signals from file
Communications Toolbox / Comm Sources
The Baseband File Reader block reads a signal from a baseband file. A baseband file is a specific type of binary file written by the Baseband File Writer block. Baseband signals are typically downconverted from a nonzero center frequency to 0 Hz. The block automatically reads the sample rate, center frequency, number of channels, and any descriptive data.
Data — Baseband signal
scalar | vector | matrix
Baseband signal, returned as a scalar, vector, or matrix. The signal is read from the file specified by the Baseband file name parameter. The sample time is either inherited from the file or can be set by the Sample Time (s) parameter.
Complex Number Support: Yes
EOF — End-of-file indicator
End-of-file indicator, returned as a logical scalar. The output is
true when the Repeatedly read the
file parameter is
false and the entire
file has been read. To enable this port, select the Output
end-of-file indicator parameter.
Baseband file name — Name of file from which data is read
example.bb (default) | character vector
Specify the name of the baseband file as a character vector.
Click Browse to locate the baseband file you want to read. Click File Info to display this information:
Number of samples
Number of channels
Any metadata fields
Inherit sample time from file — Select source of sample time
on (default) |
Select this check box to inherit the sample time from the file specified by Baseband file name.
Sample time (s) — Block sample time
1 (default) | positive scalar
Specify the block sample time in seconds as a positive scalar. To enable this parameter, clear the Inherit sample time from file check box.
Samples per frame — Number of samples per output frame
100 (default) | positive integer scalar
Number of samples per output frame, specified as a positive integer or
Inf. When this parameter is
the output frame contains all of the samples in the baseband file.
Repeatedly read the file — Continuously loop data from file
off (default) |
Select this check box to repeatedly read the contents of the baseband file. When the end of the file is reached:
The block outputs zeros, if the Repeatedly read the file parameter is not selected (
The block outputs samples from the beginning of the file, if the Repeatedly read the file parameter is selected (
Simulate using — Type of simulation to run
Code generation (default) |
Type of simulation to run, specified as
Code generation or
Code generation— Simulate the model by using generated C code. The first time you run a simulation, Simulink® generates C code for the block. The C code is reused for subsequent simulations unless the model changes. This option requires additional startup time, but the speed of the subsequent simulations is faster than
Interpreted execution— Simulate the model by using the MATLAB® interpreter. This option requires less startup time than the
Code generationoption, but the speed of subsequent simulations is slower. In this mode, you can debug the source code of the block.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
Introduced in R2016b