comm.BasebandFileWriter
Write baseband signal to file
Description
Thecomm.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. TheSampleRate
andCenterFrequency
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, seeWhat 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 thebbw
= comm.BasebandFileWriter(fname
)Filename
property tofname
.
also sets thebbw
= comm.BasebandFileWriter(fname
,fs
)SampleRate
property tofs
.
also sets thebbw
= comm.BasebandFileWriter(fname
,fs
,fc
)CenterFrequency
property tofc
.
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 thesamples
)Filename
property. The number of samples written to the file is determined by theNumSamplesToWrite
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 namedobj
, 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, seeCreate and Extract from Zip Archives.