Dear all,

I think I came over a quite fundamental error in Maple 10's CodeGeneration package. Even without knowing Matlab, it should be clear that the conversion into Matlab code goes wrong here:

restart;
tt :=  x^(1/y) :
with(CodeGeneration):
Matlab(tt);

produces

  "cg = x ^ 0.1e1 / y; "

as output, which is clearly not correct. Note that the translation of tt := x ^(b/y) correctly delivers "cg = x ^ ( b / y );", i.e. it uses the required parentheses. Conversion in other languages (like C, Java etc.) works also correct.

Can anyone confirm this error? Or spot my mistake?

 

Best regards

Ferdinand


Please Wait...