info
Characteristic information about baseband file writer
Syntax
Description
Examples
Create a baseband file writer object specifying a sample rate of 1 kHz and a 0 Hz center frequency.
bbw = comm.BasebandFileWriter('baseband_data.bb',1000,0);Save the date for today in the Metadata structure.
bbw.Metadata = struct('Date',date);Generate two channels of QPSK-modulated data.
d = randi([0 3],1000,2);
x = pskmod(d,4,pi/4,'gray');Write the baseband data to file baseband_data.bb.
bbw(x)
Display information about the baseband file writer. Then, release the object.
info(bbw)
ans = struct with fields:
Filename: '/tmp/Bdoc25b_2988451_2192830/tpa7c094fe/comm-ex66490302/baseband_data.bb'
SamplesPerFrame: 1000
NumChannels: 2
DataType: 'double'
NumSamplesWritten: 1000
release(bbw)
Create a baseband file reader object to read the saved data. Display the metadata from the file.
bbr = comm.BasebandFileReader('baseband_data.bb', ... 'SamplesPerFrame',100); bbr.Metadata
ans = struct with fields:
Date: '09-Aug-2025'
Read the data from the file.
z = []; while ~isDone(bbr) y = bbr(); z = cat(1,z,y); end
Display information about the baseband file reader. Then, release object.
info(bbr)
ans = struct with fields:
NumSamplesInData: 1000
DataType: 'double'
NumSamplesRead: 1000
release(bbr)
Confirm that the original modulated data x, matches the data z, read from file baseband_data.bb.
isequal(x,z)
ans = logical
1
Input Arguments
Baseband file writer, specified as a comm.BasebandFileWriter
System object.
Output Arguments
Characteristic information about the baseband file writer, returned as a structure. Default content include these fields.
Name of the baseband file to write, returned as a character vector. The filename shows the absolute path.
Data Types: char
Number of samples in each frame, returned as a positive integer.
Dependencies
To enable this field, you must first run the baseband file writer object.
Data Types: double
Number of channels in the baseband signal written to the file, returned as a positive integer.
Dependencies
To enable this field, you must first run the baseband file writer object.
Data Types: double
Data type of the baseband signal written to the file, returned as
'double', 'single',
'uint8', 'uint16',
'uint32', 'uint64',
'int8', 'int16',
'int32', or 'int64'.
Dependencies
To enable this field, you must first run the baseband file writer object.
Total number of baseband data samples written to the file, returned as a
positive integer. This field returns the smaller of the total number of samples
processed by the input baseband file writer object and the
NumSamplesWritten property of that object.
Data Types: double
Version History
Introduced in R2016b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)