| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Simulink |
| Contents | Index |
| Learn more about Simulink |
| On this page… |
|---|
How Embedded MATLAB Function Blocks Use the BLAS Library When to Disable BLAS Library Support |
The Basic Linear Algebra Subprograms (BLAS) Library is a library of external linear algebra routines optimized for fast computation of low-level matrix operations. By default, Embedded MATLAB Function blocks call BLAS library routines to speed simulation whenever possible, based on heuristics implemented in the Embedded MATLAB subset. These heuristics are described in How Embedded MATLAB Functions Use the BLAS Library in the Embedded MATLAB documentation.
Consider disabling BLAS library support for Embedded MATLAB Function blocks when:
You want your simulation results to more closely agree with code generated by Real-Time Workshop for your Embedded MATLAB Function block.
You are executing code on a 64-bit platform and the number of elements in a matrix exceeds 32 bits.
In this case, Embedded MATLAB automatically truncates the matrix size to 32 bits.
Your platform does not provide a robust implementation of BLAS routines.
Embedded MATLAB Function blocks enable BLAS library support by default, but you can disable this feature explicitly for all Embedded MATLAB Function blocks in your Simulink model. Follow these steps:
Open your Embedded MATLAB Function block.
In the Embedded MATLAB Editor, select Tools > Open Simulation Target.
The Configuration Parameters dialog box opens with Simulation Target selected.
Under the Embedded MATLAB and Stateflow panel, clear the Use BLAS library for faster simulation check box and click Apply.

Embedded MATLAB function blocks use the BLAS library on all C compilers except:
Watcom
Intel
Borland
The default MATLAB compiler, lcc, supports the BLAS library. To install a different C compiler, use the mex -setup command, as described in Building MEX-Files in the MATLAB External Interfaces documentation.
![]() | Enhancing Readability of Generated Code for Embedded MATLAB Function Blocks | Controlling Runtime Checks | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |