comm.BasebandFileWriter
Write baseband signal to file
Description
The comm.BasebandFileWriter
System object™ writes a specific type of binary file to store baseband signal data.
Baseband signals are typically down-converted from a nonzero center frequency to 0 Hz.
The SampleRate
and CenterFrequency
properties are saved when the file is created.
To write a baseband signal to a file:
Create the
comm.BasebandFileWriter
object and set its properties.Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?
Creation
Syntax
Description
creates a baseband file writer System object to write a baseband signal to a specific type of binary
file.bbw
= comm.BasebandFileWriter
sets the bbw
= comm.BasebandFileWriter(fname
)Filename
property to
fname
.
also sets the bbw
= comm.BasebandFileWriter(fname
,fs
)SampleRate
property to
fs
.
also sets the bbw
= comm.BasebandFileWriter(fname
,fs
,fc
)CenterFrequency
property to fc
.
sets properties using one or more name-value arguments in addition to an input
argument combination from any of the previous syntaxes. For example,
bbw
= comm.BasebandFileWriter(___,Name=Value)SampleRate
=2
sets the sample rate of
the baseband file writer to 2.
Properties
Usage
Syntax
Description
bbw(
writes one frame of
baseband samples to the file specified by the samples
)Filename
property. The
number of samples written to the file is determined by the NumSamplesToWrite
property.
Input Arguments
Object Functions
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)
Examples
Tips
comm.BasebandFileWriter
writes baseband signals to uncompressed binary files. To share these files, you can compress them to a zip file using thezip
function. For more information, see Create and Extract from Zip Archives.