This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

MATLAB Performance Improvements

Vector-Based Processing

  • Use vector-based processing. With vector-based processing, the program processes multiple samples during a single execution call to a System object™. Consider using vectors from roughly 366 to several thousand. The default is 3660, which represents 10 Ethernet packets.

  • Use large vectors of data to minimize function call overhead.

MATLAB Code Generation

You can accelerate your MATLAB® algorithms by generating a MEX function using the MATLAB Coder™ function codegen.

Use codegen to generate a MEX function from MATLAB code. The following example generates a MEX file called sdruExMex from the function sdruExample:

codegen sdruExample -args {ones(10,1)} -o sdruExMex -g -launchreport

Caution

When you use this function, you must release the radio object before attempting to exit MATLAB, or MATLAB stops responding.

For a full list of syntax options and input parameters, see the codegen reference page.

Note

sdruExample is used only for illustrative purposes; it is not a function shipped with the support package for USRP® Radio. You must provide your own function for codegen.

Related Topics