Main Content

LAPACK Calls for Linear Algebra in a MATLAB Function Block

To improve the simulation speed of MATLAB Function block algorithms that call certain linear algebra functions, Simulink® can call LAPACK functions. LAPACK is a software library for numerical linear algebra. If the input arrays for the linear algebra functions meet certain criteria, the simulation calls LAPACK functions in the LAPACK library that is included with MATLAB®. MATLAB uses LAPACK in some linear algebra functions such as eig and svd.

If you use Simulink Coder™ to generate code for these algorithms, you can specify that the code generator produce LAPACK function calls. The code generator uses the LAPACKE C interface to LAPACK. If you specify that you want to generate LAPACK calls, and the input arrays for the linear algebra functions meet the criteria, the code generator produces LAPACK calls. The build process links to the LAPACK library that you specify. See Speed Up Linear Algebra in Code Generated from a MATLAB Function Block (Simulink Coder).

Related Examples

More About

External Websites