The software package IFDIFF comprises:
- Automatic detection and processing of state-dependent switching events in ODE IVPs
- Automatic generation of only the necessary switching functions (exported as MATLAB code)
- Accurate switching point detection up to machine precision
- Detection and handling of Filippov sliding mode
- ODEs with state-jumps and model switches
- Sensitivity generation for switched ODEs, ODEs with state-jumps and Filippov ODEs
Sensitivities can be generated w.r.t. the initial values and w.r.t. a given parameter set.
For a mathematical introduction and illustrative examples, see the
IFDIFF project page.
A compact, self-explanatory MATLAB example is provided in this file. (Readme_Example.m)
There are two ways to install IFDIFF.
- Download the current release file
IFDIFF_Toolbox.mltbx. - Open MATLAB and navigate to the directory containing the file.
- Right-click the file and select Install.
- For a detailed introduction, open
GettingStarted.mlx, which is included with the toolbox.
Note: You can also open the Getting Started guide directly in MATLAB Online and then continue with the First Run Prerequisites.
- Navigate to a location of your choice on your PC (e.g. Desktop).
- Clone the repository
git clone https://github.com/andreassommer/ifdiff.git - Open MATLAB and navigate to the cloned
ifdiffdirectory.
Once every new MATLAB session run
initIFDIFF();
to initialize the required paths. Then IFDIFF is ready to use.
The first time the command is executed, a copy of MATLAB's internal parser class mtree is created on which IFDIFF heavily relies.
For a step-by-step usage example and background explanation, see the IFDIFF project page.