Main Content

Baseband File Writer

Write baseband signals to file

  • Baseband File Writer block

Communications Toolbox / Comm Sinks


The Baseband File Writer block writes a baseband signal to a specific type of binary file. Baseband signals are typically down-converted from a nonzero center frequency to 0 Hz. Sample rate, which is determined by the input signal sample time and frame size, and center frequency are saved when the signal is written to a file.



expand all

This port accepts a baseband signal to be saved under the filename specified by the Baseband file name parameter. The saved signal is always complex.

Data Types: single | double
Complex Number Support: Yes


expand all

Specify the name of the baseband file as a character vector.

To specify the location where the file is saved, click Browse.

Specify the center frequency in Hz as a nonnegative scalar.

Specify data describing the baseband signal as a structure. If the signal has no descriptive data, this parameter is an empty structure. The structure can contain any number of fields. Field names have no restrictions, but the field values must be numeric, logical, or character data types having any dimension.

Specify the number to write. If this parameter is inf, all samples are saved. Otherwise, only the last N samples are saved, where N is specified by this parameter.

Code generation

On the first model run, simulate and generate code for the block using only MATLAB® functions supported for code generation. If the structure of the block does not change, subsequent model runs do not regenerate the code.

Interpreted execution

Simulate model using all supported MATLAB functions. Choosing this option can slow simulation performance.

Block Characteristics

Data Types

double | integer | single

Multidimensional Signals


Variable-Size Signals



  • The Baseband File Writer block writes baseband signals to uncompressed binary files. To share these files, you can compress them to a zip file using the zip function. For more information, see Create and Extract from Zip Archives.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2016b

See Also