WOLFRAM SYSTEMMODELER

ExternalFunctions

This example illustrates how to call an external function written in C.

Package Contents

Chirp

An external chirp function

ChirpSignal

A block of an external chirp signal

SeriesCircuit

A circuit using an external chirp signal

Wolfram Language

In[1]:=
Click for copyable input
SystemModel["IntroductoryExamples.ExternalFunctions"]
Out[1]:=

Information

While it is easy to write Modelica functions, it is sometimes convenient to call a subroutine written in C or FORTAN. In this example an external C function is created and then used in a SystemModeler model.

For a step by step tutorial see External Function—Chirp Signal.

Chirp

A Chirp function is defined using an external C-function.

ChirpSignal

A Chirp block is defined using the function above.

SeriesCircuit

The ChirpSignal block is used to test the resonance frequencies of an electrical circuit.