This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Code Generation

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

The results of symbolic computations obtained in MuPAD® are often used in numeric MATLAB computations that exclusively use standard double-precision arithmetic. MuPAD provides functions for converting MuPAD expressions to MATLAB, C, Fortran, MathML, and TeX code. You can also convert MuPAD expressions to equations based on the Simscape language.

With these functions, you can convert the results of your exact symbolic computations, done analytically in the MuPAD Notebook, into functions based on numeric computation, ready to be used in other parts of your program. Using the generated MATLAB and Simscape code does not require a license for Symbolic Math Toolbox™.

MuPAD Functions

generate::CGenerate C formatted string
generate::fortranGenerate Fortran formatted string
generate::MathMLGenerate MathML from expressions
generate::MATLABGenerate MATLAB formatted string
generate::optimizeGenerate optimized code
generate::SimscapeGenerate Simscape equation
generate::TeXGenerate formatted string from expressions


Create MATLAB Functions from MuPAD Expressions

MuPAD notebooks are not recommended.

Create MATLAB Function Blocks from MuPAD Expressions

MuPAD notebooks are not recommended.

Create Simscape Equations from MuPAD Expressions

MuPAD notebooks are not recommended.

Was this topic helpful?