Contenuto principale

stopCapture

Stop capture running in background using baseband receiver or transceiver

Since R2024a

Description

stopCapture(bba) stops any capture in the background using the specified baseband receiver or transceiver bba.

example

Examples

collapse all

Create a baseband receiver object, specifying a radio setup configuration previously saved in the Radio Setup wizard.

bbrx = basebandReceiver("MyRadio")
bbrx = 
  basebandReceiver with properties:

               RadioGain: 10
         CenterFrequency: 2.4000e+09
              SampleRate: 250000000
                Antennas: "RF0:RX2"
    DroppedSamplesAction: "error"
         CaptureDataType: "int16"

Request 5 s of IQ data in the background and save it to a file in the basebandData folder called capture1.mat.

mkdir('basebandData');
[dataPath,~] = capture(bbrx,seconds(5), ...
    SaveLocation='basebandData/capture1.mat', ...
    Background=true);

Check if the capture is in progress.

isCapturing(bbrx)
ans = logical
   1

Stop the capture after 1 s.

pause(1);
stopCapture(bbrx);

Check that the capture is no longer in progress.

isCapturing(bbrx)
ans = logical
   0

Input Arguments

collapse all

Baseband application, specified as a basebandReceiver object or basebandTransceiver object.

Tips

Check the status of the capture by using the isCapturing function before using the stopCapture function:

isCapturing(bba)
This function returns 1 (true) if a capture is in progress in the background.

Version History

Introduced in R2024a

expand all