.. _functions:

Functions
*********

Up to this point, we've used many of the built-in functions in
Modelica in previous examples and particularly in our discussion of
:ref:`array-functions`.  While Modelica includes an extensive set of
functions for many common calculations, users still need the ability
to define their own functions.  The process of defining functions is
the central topic of this chapter.

As always, we'll start with several examples to motivate the need for
user defined functions.  Then we'll review the important elements of
user defined functions in Modelica.

Examples
========

.. toctree::
   :maxdepth: 1

   functions/polynomial
   functions/interpolation
   functions/controller
   functions/nonlinear

Review
======

.. toctree::
   :maxdepth: 1

   functions/func_def
   functions/control_flow
   functions/external
   functions/func_annos
