MTM
ccode
generate C code for an expression
Calling Sequence
Parameters
Description
Examples
ccode(A)
ccode(A,x)
A
-
expression, Array, Matrix, or Vector of expressions
x
(optional) string
The ccode(A,x) function creates a C statement which represents the assignment of the expression A to the variable x. This C statement is returned as a string.
When called with the form ccode(A), the expression A is assigned to a default variable name in the returned statement.
with⁡MTM:
ccode⁡x4−5⁢x2+2,w
w = pow(x, 0.4e1) - 0.5e1 * x * x + 0.2e1;
See Also
CodeGeneration[C]
MTM[fortran]
Download Help Document