Generating Matlab Code using Maple

1.3k Views Asked by At

When exporting Matlab Code from Maple using for example the command fprintf(FileName, %s, CodeGeneration[Matlab](VariableName, output = string)) I get the text cg2=Expression.

Expression is correctly exported, except that the variable name is not.

I want to write the variable name instead of cg2 (knowing that $cg_i$ is generated automatically by Maple and the $i=0,1,2,...$) . Can any one

1

There are 1 best solutions below

1
On BEST ANSWER

For example:

CodeGeneration[Matlab](x^2+3, output=string, resultname = y);

"y = x^2 + 3"