ccode
C code representation of symbolic expression
Syntax
Description
ccode(
uses additional options specified by one or moref
,Name,Value
)Name,Value
pair arguments.
Examples
Input Arguments
Tips
To generate optimized C or C++ code from a symbolic expression, especially for a large expression, you can use theMATLAB®Coder™app instead of using the
ccode
function. This way, the generated code is better integrated into the MATLAB ecosystem. First, convert the symbolic expression to a deployable MATLAB function usingmatlabFunction
. Then, generate C or C++ code from the MATLAB function using theMATLAB Coderapp. For an example, seeGenerate C Code from Symbolic Expressions Using the MATLAB Coder App.