Items tagged with codegen codegen Tagged Items Feed

Hi all,

I'm using MAPLE 13 and I'd like to know if someone knows how to generate the variables associated to the CodeGeneration for C code. At this moment I need to create manually the variable generated from the C code.


JJ := Jacobian(convert(Pint, Vector), [P1xenu, P1yenu, P1zenu, roll, pitch, yaw, D1xbody, D1ybody, P2xenu, P2yenu, P2zenu, ROLL, PITCH, YAW, D2xbody, D2ybody]);

CodeGeneration['C'](JJ, optimize);


t1 = cov2 * cov2;
t2 = cov1 * cov1;
t4 = 0.1e1 / (t1 + t2);

And in the C code I need to create:

double t1, t2, t3..... manually

I can I solve this issue?

Best regards

André Dias

I'm new to Maple, so my question could appear idiotic. But, anyway. :-)

I want to understand the restrictions of code generation in Maple.
What functions could I convert to code?
Only listed in "Translation of Functions" block in this link?

For example, I've found this post - 

Could functions "Maximize" and "diff" be converted to Java, VB or something or not? If yes, how?

Thanks anyway. :-)

I have a maple classic code. at the end I convert a parametric matrix to fortran77 code. in optimized mode

now I need to edit the Fortran77 code to Fortran90. for this job I have another code to do that.

but how should I write the codegen output to a test file?

The version 16 of Maple does not know the function "pow", it is replaced by "power". Nevertheless, the codegen[optimize] procedure still generates it!  Moreower, it's not optimal even to write poser(..., 1/2)  as, most probably, the function sqrt must run faster. 

  Here's an example: (the function being optimized just contains some nested square roots)

> iang10 := [codegen[optimize](Re(int11), tryhard)];
[ 2 t17
Page 1 of 1