Define custom block functionality with MATLAB®, C, C++, or Fortran code

S-functions (system-functions) allow you to extend the capabilities of the MATLAB environment by creating custom blocks. An S-function is a computer language description of a Simulink® block written in MATLAB, C, C++, or Fortran. C, C++, and Fortran S-functions are compiled as MEX files, dynamically linked subroutines that the MATLAB interpreter can automatically load and execute.

For information on choosing what type of S-function to use, see S-Function Types and Implementing S-Functions.

Was this topic helpful?