Posted by gfx
on October 10, 2005 at 1:49 PM PDT
While looking for an efficient graping tool for Windows, I discovered a very interesting feature of Maple.
When I'm home and need to tweak and plot an equation, I use an excellent tool that ships with MacOS X 10.4, Grapher. Easy to use, it fits my purpose and provides a good user experience:
As I don't want to carry both my laptops to the office every day, I bring only my Windows box, on which I have yet to find a tool to replace Grapher. I have tried several tools and none convinced me yet. Nevertheless, I decided to give Maple 10 a try. I learned how to use Maple a few years ago at school and I was wondering what new stuff it could offer. Well, first of all, it seems to be written mostly in Java (at leat the whole UI is). The UI is also much easier for newcomers and now provides completion, context sensitive menus, and so forth. But that's not my point. Maple proved to be a valuable Java development tool.
It turns out Maple offers a language translation feature that can turn calculations, equations and even "Maple script" procedures into another language. Among the available targets are C, FORTRAN, MATLAB, Visual Basic and... Java. Take this example for instance:
To use this equation in my Java source code I can just right click on it and go to the Language Conversion menu:
And here is the result:
I'll grand you this feature is not the best one I have ever seen to boost my productivity but it's sure really handy, especially when you don't want to mess up parenthesis and other weird mathematical stuff. You can also optimize the computation and then generate the code:
This version makes it easier to break the computation into several methods which can be very useful when you know some parts won't change at runtime. I was happily surprised to find a good Java asset with Maple :)