Main Content

Code Generation

Use symbolic results in MATLAB®, Simulink®, Simscape™, C, Fortran, and LaTeX

The results of symbolic computations are often used in numeric codes that exclusively use standard double-precision arithmetic. Symbolic Math Toolbox™ provides functions for generating MATLAB functions, Simulink Function blocks, and equations based on the Simscape language – directly from symbolic expressions.

With these functions, you can convert the result of your symbolic computations into functions based on numeric computation, ready to be used in other parts of your program. Using the generated MATLAB functions does not require a license for Symbolic Math Toolbox. You can also convert symbolic expressions into C, Fortran, MathML, and TeX code.

Functions

expand all

matlabFunctionConvert symbolic expression to function handle or file
matlabFunctionBlockConvert symbolic expression to MATLAB function block
simscapeEquationConvert symbolic expressions to Simscape language equations
symReadSSCParametersLoad parameters from Simscape component
symReadSSCVariablesLoad variables from Simscape component
symWriteSSCCreate new Simscape component
ccodeC code representation of symbolic expression
fortranFortran representation of symbolic expression
latexLaTeX form of symbolic expression
mathmlGenerate MathML from symbolic expression
texlabelTeX representation of symbolic expression

Topics