Edit me

Overview

Compared to MATLAB’s native Symbolic Math Toolbox, Wolfram Mathematica provides more powerful symbolic math engine in terms of speed and performance. But, using Mathematica directly from its graphic front-end interface is always a challenging task for many users due to its special syntax and code structure.

Therefore, FROST provides a custom symbolic math toolbox for MATLAB that uses the Mathematica Kernel as backend engine via Mathlink. FROST’s symbolic math toolbox has the following main features:

  • using similar syntax as MATLAB’s native symbolic math toolbox
  • exporting the symbolic expression to C++/Matlab code
  • calling any Mathematica function from MATLAB directly

Dependencies

FROST’s symbolic toolbox is based on Ben Barrowes’s open source project: Mathematica Symbolic Toolbox for MATLAB–Version 2.0. A slightly modified version of the source code and pre-compiled binaries for Linux and Windows machine are included with FROST (third/mathlink/). Alternatively, you could also download the original source code and pre-compiled mex binaries from Mathworks File Exchange server or Matlab’s Addons manager. For more information, please refer to the project page here.

Toolbox Structure

FROST extends Ben’s symbolic toolbox to a more complete Matlab toolbox that can be used almost like the native symbolic math toolbox. Our toolbox consists of three Matlab classes defining custom data types and a few utility functions for convenient operations.

Symbolic Class Types

  • SymExpression: This basic class defines any symbolic Mathematica expression in Matlab (analogous to sym in Matlab)

  • SymVariable: Inherited from SymExpression, this class defines one or a group of symbolic variables with a special syntax (analogous to symvar

  • SymFunction: This class works as a wrapper of a SymExpression object, storing some additional information regarding the SymExpression object that are mostly useful for exporting to C++ source code.

Caption: Class Hierarchy of Symbolic Math Toolbox

Symbolic Utility Functions

In addition to these three classes, FROST also contains several utility functions for communication with Mathematica Kernal and converting native Matlab variables to an equivalent Mathematica expression. Please read this tutorial for more detail.

Tags: symbolic