| Contents | Index |
You can use ANSI C functions that do not use the Windows operating system in your custom blocks or I/O drivers. The following includes a partial list of supported functions:
Data conversion — abs, atof, atoi, atol, itoa, labs, ltoa, strtod, strtol, strtoul, ultoa
Memory allocation — calloc, free, malloc
Note Memory allocation is not an operation that can be done in real time. To work with a Real-Time Windows Target application, memory management must occur before real-time simulation begins. Simulation switches into real-time after mdlStart, so you can allocate memory in mdlInitializeSizes or mdlStart. You cannot allocate memory in any function after mdlStart, such as mdlOutputs or mdlUpdate. |
Memory manipulation — _memccpy, memcpy, memchr, memcmp, _memicmp, memmove, memset
String manipulation — strcat, strchr, strcmp, strcpy, strcspn, _strdup, _stricmp, strlen, _strlwr, strncat, strncmp, strncpy, _strnset, strpbrk, strrchr, _strrev, _strset, strspn, strstr, strtok, strupr
Mathematical — acos, asin, atan, atan2, ceil, cos, cosh, div, exp, fabs, floor, fmod, frexp, ldexp, ldiv, log, log10, max, min, modf, pow, rand, sin, sinh, sqrt, srand, tan, tanh, uldiv
Character class tests and conversion — isalnum, isalpha, _isascii, iscntrl, isdigit, isgraph, islower, isprint, ispunct, isspace, isupper, isxdigit, isxupper, isxlower, _toascii, tolower, toupper
Searching and sorting — bsearch, qsort
Dummy functions — exit, fprintf, prinf
![]() | Unsupported C Functions |

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