capture
Description
[
captures IQ data of length data
,dataLength
] = capture(device
,length
)length
from the air using the specified
NI™
USRP™ radio device. The function returns the captured signal
data
and the captured data length
dataLength
.
Examples
Configure NI™ USRP™ Radio Device and Retrieve Captured Data
Create a usrp
System object™, specifying a radio setup configuration previously saved in the Radio Setup wizard.
device = usrp("MyRadio");
Program the FPGA with your bitstream and configure the hardware interfaces.
programFPGA(device, "myBitstream.bit", "myDeviceTree.dts");
Loading bitstream to FPGA... Loading bitstream to FPGA is now complete.
describeFPGA(device, "ModelName_wthandoffinfo.mat");
Specify a capture antenna on the radio and memory allocation in the PL DDR Buffer.
captureLength = 1000;
device.CaptureAntennas = "DB0:RF1:RX1";
device.CaptureDDRAllocation = captureLength;
Connect to the radio and apply radio front end properties.
setup(device);
Call the usrp
System object™ as a function to start the radio front end. Request captureLength
samples.
device(captureLength);
Retrieve captureLength
samples of captured IQ data from the radio at the default center frequency and baseband sample rate.
[data,dataLength] = capture(device,captureLength);
Confirm that all requested samples were retrieved from the radio.
isequal(dataLength,captureLength)
ans = logical
1
Input Arguments
device
— NI USRP radio device
usrp
object
NI
USRP radio device, specified as a usrp
System object™.
length
— Capture length
integer number of samples
Capture length, specified as an integer number of samples.
The number of samples you can request is limited by the CaptureDDRAllocation
of the device
input.
Note
If your host computer does not have enough free memory to receive the captured data, the function call can hang or error out. To free up memory space on your host computer, try closing other software or reduce the capture length.
Example: 1e5
Data Types: double
| duration
Output Arguments
data
— Captured signal
complex-valued column vector
Captured signal, returned as a complex-valued column vector.
Note
The first data samples of the captured signal can contain transient values from the radio data path.
Data Types: int16
Complex Number Support: Yes
dataLength
— Captured data length
integer number of samples
Captured data length, returned as an integer number of samples.
Note
If your host computer does not have enough free memory to receive the captured data, the function call can hang or error out. To free up memory space on your host computer, try closing other software or reduce the capture length.
Data Types: double
Version History
Introduced in R2024a
MATLAB-Befehl
Sie haben auf einen Link geklickt, der diesem MATLAB-Befehl entspricht:
Führen Sie den Befehl durch Eingabe in das MATLAB-Befehlsfenster aus. Webbrowser unterstützen keine MATLAB-Befehle.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)