Write baseband signals to file
A baseband file is a specific type of binary file written by the comm.BasebandFileWriter
System object™. 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 save a baseband signal to a file:
Create a comm.BasebandFileWriter
object and
set the properties of the object.
Call step
to save a baseband signal to a
file.
Call release
to save the baseband signal to
a file and to close the file.
Note
Alternatively, 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.
bbw = comm.BasebandFileWriter
returns a baseband writer object,
bbw
, using the default properties.
bbw = comm.BasebandFileWriter(fname)
returns bbw
and sets fname
as the
Filename
property.
bbw = comm.BasebandFileWriter(fname,fs)
also sets
fs
as the SampleRate
property.
bbw = comm.BasebandFileWriter(fname,fs,fc)
also sets
fc
as the CenterFrequency
property.
bbw = comm.BasebandFileWriter(fname,fs,fc,md)
also sets structure
md
as the MetaData
property.
bbw = comm.BasebandFileWriter(___,Name,Value)
specifies additional properties using Name,Value
pairs. Unspecified
properties have default values.
Example:
bbw = comm.BasebandFileWriter('qpsk_data.bb',10e6,2e9);
info | Characteristic information about baseband file writer |
reset | Reset states of baseband file writer object |
step | Write baseband signal to file |
Common to All System Objects | |
---|---|
release | Allow System object property value changes |
comm.BasebandFileWriter
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.