Question: Help! Unable to optimize the Maple to Matlab code generation?

Hi all,


I am helping a friend.

Please see the two expressions that we would like to convert from Maple into Matlab:


In the first one, why doesn't Maple first calculate g1^(2/3) and g2^(2/3) as common expressions, then use them to calculate the whole expression?

The (0.1e1/0.3e1) stuff looks very bad.


In the second one, we just couldn't get Maple to cancel the common factor g1^(2/3) in both numerator and denominator before doing the conversion to Matlab.


Any thoughts about how we could generate good quality Matlab code?


Thanks a lot!

Please Wait...